Description:
Discussion about C.
|
|
|
variable arguments question
|
| |
Hi, I've two questiond regarding variable arguments. First, how to count arguments passed ? I see that va_arg macro can be used, but if don't know type of arguments ? Then, How can a print a % sign with vsnprintf ? Please consider this code: // ...// ...// void myPrintf(char *szText, ...) { char szBuffer[BUFFER_SIZE] = { 0 };... more »
|
|
Mr Ed
|
| |
Why do you post here at comp.lang.c? You show no respect for anybody here and no knowledge of the subject, C. That Heathfield and now Seebach treat you seriously is mystery to me but, of course, their business. You do seem widely read. As if you were locked in a library for several years and had nothing to do but read the books. Not the technical ones it seems, but... more »
|
|
Encoding Return Address and Stack Pointer
|
| |
Making the stack area non-executable will not help against stack based buffer overruns, since the return address could be changed to an executable area of memory. A solution could be that the C compiler is setup so that when a function call is made, it is set up to encode the return address placed on the stack with the stack pointer (SP) and possibly some fast... more »
|
|
ohmigod I forgot to google for time
|
| |
I have an unusual posting style where I tend to waste the first paragraph of a post. Newsreading requires a news writer, and any writer worth his salt does not approach his topic too quickly. So it is that I might ask for the answer before I have the subject or keywords that might power an internet browser search with some degree of... more »
|
|
I love relational operators so much
|
| |
C's handling of 'if' leads to a lot of room for obfuscation. All you have to do is replace ';' with '|' for compound expressions and add parentheses as neccessary. if (x) y; else z; becomes ((x)&&(y)) ...for compounds, if (x) y;z;a;b; else c;d;e;f; becomes ((x) && ((y)|(z)|(a)|(b)) ...C is so much fun to obfuscate. Gotta love ISO 9899.... more »
|
|
Stats for comp.lang.c (last 7 days)
|
| |
============================== ============================== ================ Analysis of posts to comp.lang.c ============================== ============================== ================ (stats compiled with a script by Garry Knight) Total posts considered: 973 over 7 days... more »
|
|
&& Suggestion
|
| |
Hi all, Actually there is quite a lot of spam here after all. How about we prefix all our messages with some symbol or other we can all agree to use as I've done here, so meaningful, on-topic posts can be more readily sorted from the rubbish?
|
|
Macro preprocessing
|
| |
Hi All, I have a following kind of situation. ...int main(){ ...int a,a_b; a = r(b); ...where I need to construct a symbol ab, at the place where code is executed. A g++ -E test.c, however insert a space between a and b. What could be possible solution for this?
|
|
Linked list question
|
| |
What's the difference between using some like struct node* current as a temporary variable in the following function... int Length(struct node* head) { struct node* current = head; int count = 0; while (current != NULL) { count++; current = current->next; } return count; ...As opposed to not using one in the same function....... more »
|
|
|