What's this:
Code:q = (q->next == oldhead ? NULL : q->next);
What's this:
Code:q = (q->next == oldhead ? NULL : q->next);
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge
it means
Code:if (q->next == oldhead) q = NULL; else q = q->next;
Ah...thanks
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge
And it's called a ternary operator :-)
These are handy for when you wish to annoy people with hard to follow code. I do use them a lot of the time though... Just do not get carried away with them since they really do make your code more difficult on others.
Frequent use of these & a lack of/poor use of white space & you have all the standards evident in Obfuscated C Code.
long time no C; //seige
You miss 100% of the people you don't C;
Code:if (language != LANG_C && language != LANG_CPP) drown(language);
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.