comp.lang.c http://groups-beta.google.com/group/comp.lang.c
Today's most active topics: * Coding [style] standards - 21 new http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/45fff8e456da3b6e * role of semicolon - 12 new http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/51e0bfccfbbc693 * Hello, World! - 11 new http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/114b240b91b1f722 * C call of a C# dll - 10 new http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/5e9923bd86ab96f4 * Question about unpacking a binary file: endian troubles - 10 new http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/703924ad651c57db Active Topics ------------- global Variables - 2 new ------------------------ Hi, and thank you all, for taking the time to answer my question. The answers help me a lot. have a nice christmas time Michael - Mon, Dec 20 2004 9:19 am 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/dd3e5ad32322a3f2 Is there any GENRIC MACROS in c for INTEGERS,CHARACTERS ? - 6 new ----------------------------------------------------------------- ...There's another reason: isspace() and friends take the same kind of argument (int, with a value of unsigned char or EOF) that getchar() returns. I can't help but think that this is intentional. It can certainly be very useful. Richard - Mon, Dec 20 2004 8:22 am 6 messages, 4 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/cafd52e524781b8e C call of a C# dll - 10 new --------------------------- ...You're right there. Absolutely right. Then again, there's no such language as C either. There's ANSI C, there's this C, there's that C. And there's another C. BTW: which flavor is allowed to be discussed in this NG? Almost the same with C++. But I'm sure you knew that. > you surely know that C and C++ are - Mon, Dec 20 2004 9:26 am 10 messages, 5 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/5e9923bd86ab96f4 strncat copies junk values .... - 5 new --------------------------------------- Good morning everyone, Can someone comment what is wrong with these statements .. ...main() { char *final, *s="abcdefghij"; int count = 9; final = (char *) malloc (count * sizeof(char)); strncat(final, s, count); printf ("\nFinal = %s\ n", final); ...Why does it print some junk values ... - Mon, Dec 20 2004 12:53 am 5 messages, 5 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/c3f41c30127b5549 Hello, World! - 11 new ---------------------- Hello, World! This is my first post. - Mon, Dec 20 2004 1:29 am 11 messages, 9 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/114b240b91b1f722 initializing data at compile time: Example 1 - 2 new ---------------------------------------------------- ...Obviously. Sorry if I did not write that explicitely down. ...Yes. I intended that macro within the context of compile time only, not run time. - Mon, Dec 20 2004 10:34 am 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/4db0af250f645590 Error in K&R 2? - 8 new ----------------------- This is not mentioned in the official list at [link]. On page 257, FLT_MAX_EXP is defined as "maximum n such that (FLT_RADIX^n)-1 is representable" (at least, that's the closest I can express it in ASCII); whereas it should be "maximum n such that FLT_RADIX^(n-1) is representable" - Mon, Dec 20 2004 2:17 am 8 messages, 6 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/28032d01c413107e Coding [style] standards - 21 new --------------------------------- ...... ...They can also be very easy to read and maintain. The error is in trying to make this a style issue at all. Sometimes multiple returns are appropriate sometimes they aren't. ...While this is a real issue there are many functions that are not affected by it. ... ...I have to say this is a pet hate of mine. You are significantly - Mon, Dec 20 2004 10:16 am 21 messages, 14 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/45fff8e456da3b6e pointer and array - 3 new ------------------------- ...A compiler can refuse to compile the program, indeed this is a reasonable thing for a compiler to do in this case. ...No, the value of str is a pointer to the first element of the array, &str is a pointer to the array as a whole. There is no requirement that these two types of pointer have the same representation or are passed in the - Mon, Dec 20 2004 10:45 am 3 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/e4c870ac8a719063 long long data type - 1 new --------------------------- ...%llu is for unsigned long long, for long long use %lld. You CAN also use % lli. However %d forms are usually preferred over %i because %d was the original, %i was only a later addition; it is possible that some old compilers may not support %i, and %d is what C programmers tend to be used to. d can be easier to read than i in some character - Mon, Dec 20 2004 11:02 am 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/936e8af6ae023b92 Learning C with Older books ?. - 3 new -------------------------------------- ...Not at all ! It is not well known, and it is not portable. Furthermore, it is not reliable : it is blatant undefined behaviour (because of integer overflow). (size_t)-1 is not necessarily the largest value size_t can represent : just think of the different representations C99 allows for integer arithmetic. It - Mon, Dec 20 2004 12:30 pm 3 messages, 3 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/66bc74d8d8d22b33 role of semicolon - 12 new -------------------------- ...I was just using the Standard's definition of a compound statement which as others have said has the form { } enclosing a sequence of 0 or more declarations and statements. Lawrence - Mon, Dec 20 2004 11:51 am 12 messages, 5 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/51e0bfccfbbc693 Command line C compiler needed - 2 new -------------------------------------- ...Not likely. The OP assumed that everybody would know what system he has ( probably because he doesn't even consider the possibility of other systems' existence), which means that it is highly likely that he is on some kind of M$ Windows. M$ OSes don't come with C compilers. You need to download one. - Mon, Dec 20 2004 12:24 pm 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/47dc807a6237d819 [OT] Why (or not) use single letter variable names? - 2 new ----------------------------------------------------------- ...It's actually quite suited to that purpose, because it's pronounced "at". If you read my email address as "rlb at hoekstra-uitgeverij.nl" you have exactly what it means: the mailbox of rlb (that's me, Richard L. Bos), at that mail server. ...There isn't, but that doesn't stop e-marketeers from e-calling - Mon, Dec 20 2004 12:26 pm 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/8d23b78983ebc10f Sort in the Descending Order - 4 new ------------------------------------ pete wrote: ...This what I came up with, in case you did: /* BEGIN order.c */ . ..typedef E_TYPE e_type; int compar(const void *key, const void *base); void order(const void *key, void *base, size_t *index, size_t nmemb, size_t size, int (*compar)(const void *, const void *)); - Mon, Dec 20 2004 12:48 pm 4 messages, 3 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/48fad044ad9389b9 typedef - 9 new --------------- typedef struct { WORD versionNumber; WORD offset; ...MENUITEMTEMPLATEHEADER; This is from vol 5 of unnamed platform's programmer's reference. I could make this conforming by enclosing everything in a /*...*/ comment and appending the 'hail world' code. Is there an easier, and, let's say, more - Mon, Dec 20 2004 8:31 am 9 messages, 5 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/f2cf2a8a76eb3071 Program Design for Large volume file processing - 1 new ------------------------------------------------------- ...Do the arithmetic. 1000000 * 1024 * 8 (assuming an 8-bit-byte platform for the moment) comes to 8192000000 bits. If you have, say, 7 hours to transfer this amount of data, you will need to throw bits down the wire at a rate of at least 325 kbps. This should easily be within the reach of modern network cards. I don't think you'll have a problem. - Mon, Dec 20 2004 2:50 pm 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/2856961358f8be4 [OT] Request GMAIL Invitation. - 1 new -------------------------------------- Mike Wahler <[EMAIL PROTECTED]> spoke thus: ...My personal opinion is that it's been a stroke of marketing genius - look at the huge amounts of buzz the invitation gimmick has generated. - Mon, Dec 20 2004 3:34 pm 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/419e3af3c4a7ee42 threads / malloc / free / global array - 3 new ---------------------------------------------- ...This is ridicolous. You are saying that I should not write programs if I want to conform to the standards. Threads are an application that is going to be part of my program. ...This is true and probably should be discussed in another N.G. ...In my opinion threads are an extension to the OS ...Ciao - Mon, Dec 20 2004 3:26 pm 3 messages, 3 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/146373d697d992f2 Interprocess communication: which scenario? - 4 new --------------------------------------------------- I need to do the following simple interprocess communication (IPC) among these processes that are all on the same box: -- A daemon waits for "I'm here" announcements from multiple clients -- One or more clients send an "I'm here" to the daemon upon command via the client's GUI (Each client's GUI is viewed by a different - Mon, Dec 20 2004 7:49 am 4 messages, 4 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/edc274c3672c58bf Array - 3 new ------------- Scusate qualcuno conosce il codice esatto della funzione x gli array dell'"insertion sort". Mi serve l'algoritmo completo scritto in C. Vi ringrazio molto x l'aiuto. - Mon, Dec 20 2004 4:16 pm 3 messages, 3 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/11a51a0d2d9f2108 small numerical differences in floating point result between wintel and Sun/ SPARC - 4 new ------------- ...Does the Standard have anything to say about machine epsilon? MPJ - Mon, Dec 20 2004 10:14 am 4 messages, 4 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/4c4b003fcf97adad "free space" with declared type - 2 new --------------------------------------- Sorry if this ends up out-of-thread but Google posting seems to have a temporary problem quoting articles. ...Am I correct in conjecturing that the basic conclusion of this UB is that one can't write an allocator of his/her own? Without having free storage at hand (i.e. having only objects with declared type) one is - Mon, Dec 20 2004 9:33 am 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/ea705eb6ba84f013 CreateProcessAsUser - How to get User Token - 2 new --------------------------------------------------- Hello, I have three questions, and any answer might help :) 1. I have the following situation: I have application that is launched from the SYSTEM User, so it runs under this user too. That of course is a high security risk in many aspects. I know how to Create a process "AsUser", but I have to know the Username and Password - Mon, Dec 20 2004 10:20 am 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/7f9461044601f42a Question about unpacking a binary file: endian troubles - 10 new ---------------------------------------------------------------- Hi guys, This may be a dumb question; I'm just getting into C language here. I wrote a program to unpack a binary file and write out the contents to a new file as a list of unsigned integers. It works on an IBM mainframe under AIX with GCC, but has trouble on Intel with GCC (DJGPP). I think it's an endian problem. - Mon, Dec 20 2004 3:57 pm 10 messages, 6 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/703924ad651c57db Missing Graph.h and (Graph.lib) woes - any help - 5 new ------------------------------------------------------- Hi All, I am trying to compile an old C code written for the Borland Compiler on the DOS platform. This is a tactical solution and I intend to rip out the GUI side of things and slap on something like Qt or Tcl/Tk (I'll also be poting to linux), but for now, i am running out of time and getting quite desperate. - Tues, Dec 21 2004 12:29 am 5 messages, 5 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/8d398e0062fbe57f 3D array pointer arithmetic - 4 new ----------------------------------- >From the C Faq: 'You can keep the array's contents contiguous, while making later reallocation of individual rows difficult, with a bit of explicit pointer arithmetic: ' ' int **array2 = malloc(nrows * sizeof(int *)); ' array2[ 0] = malloc(nrows * ncolumns * sizeof(int)); ' for(i = 1; i < nrows; i++) - Tues, Dec 21 2004 12:43 am 4 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/208fe71928438cdc We are getting deeper and deeper of ctype.h and isspace() ,but no one is telling me ths solution ! - 6 new --------------------------------- Are there no genric Macros in c to represent Integers,Characters,...or other data types ? I want to pass that MACRO (representing an alpha numeric Character)to that strrchar() function,to get the last occurence of the last NON SPACE or Alphanumeric character,then i want to increase the position by one and add a NULL char ....This is my IDEA of rtrim - Mon, Dec 20 2004 10:16 pm 6 messages, 6 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/c7a110e6ecf19da1 ============================================================================== You received this message because you are subscribed to the Google Groups "comp.lang.c" group. To post to this group, send email to [EMAIL PROTECTED] or visit http://groups-beta.google.com/group/comp.lang.c To unsubscribe from this group, send email to [EMAIL PROTECTED] To change the way you get mail from this group, visit: http://groups-beta.google.com/group/comp.lang.c/subscribe To report abuse, send email explaining the problem to [EMAIL PROTECTED] ============================================================================== Google Groups: http://groups-beta.google.com
