Jan 23, 2012 at 6:35pm UTC
Can i name a variable 1pwn or pwn1? If I can or cannot, why?
Jan 23, 2012 at 6:41pm UTC
http://cplusplus.com/doc/tutorial/variables/
Jan 23, 2012 at 6:54pm UTC
a variable called either of those two names isn't going to make for very easily readable code, make your variable names descriptive.
Jan 23, 2012 at 8:26pm UTC
Please refer to your textbook regarding variable names.
Jan 24, 2012 at 6:08am UTC
Name it anything you'd like...(at least make sure it has some sort of meaning :/ )
Jan 24, 2012 at 1:35pm UTC
You can't name a variable 1pwn as it is illegal syntax because it starts with a number. This has to do with the suffix type modifiers like, L, f, and u.
1 2 3 4 5 6
1uL; //unsigned long
1L; //long
1; //int
1f; //float
1.0; //double
1.0f; //float
Thus, to prevent syntax ambiguity, you cannot name variables starting with a number.
Last edited on Jan 24, 2012 at 1:36pm UTC