It makes it an unsigned number. Default is int, U makes it unsigned, L long
123U unsigned int
123UL unsigned long int
123L long
123LL long long
I think there was a post about this somewhere edit: yeah see --v
It makes it an unsigned number. Default is int, U makes it unsigned, L long
123U unsigned int
123UL unsigned long int
123L long
123LL long long
I think there was a post about this somewhere edit: yeah see --v
Last edited by robwhit; 03-02-2008 at 01:47 AM.
Indeed -- well, I made one anyway.
http://cboard.cprogramming.com/showp...88&postcount=5
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.
Integral promotion would promote, say, an int to an unsigned int. Basically, all operands of an expression are converted to the "largest" type, or widest, or whatever. signed char is the lowest, then unsigned char, then signed short, and so on, until unsigned long (or unsigned long long, if it exists); then float, then double.
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.