🔒 Locked
Most common syntax error
Advertisement
Original Post
Yeah simple typos are usually what cause the mose errors for me. I''ve come to realize not to panic when after compiling a simple bit of code I get 76 errors, because I know that most likely I just mispelled something
unkn.Enigma1625
unkn.Enigma1625
Getting the case wrong in variable names such as aBigLongVariableName, or spelling them wrong when I go back to a class I wrote months ago.
Unrolling a loop 64 times by copy-paste, then finding 64*n typos
********
A Problem Worthy of Attack
Proves It''s Worth by Fighting Back
********
A Problem Worthy of Attack
Proves It''s Worth by Fighting Back
quote:
When I''m programming late at night sometimes I''ll screw up my if-statements when testing for equality... = instead of ==
guuh, just mentioning that makes my head hurt, i remember once when i had c++ homework and i was running really short on time, i spent probably over and hour trying to find out why the hell my program wouldn''t work, then i catch a = instead of a == in an if statement, damn i was so stressed out
I''ve seen someone do this, then took hours debugging:
// output, only once instead of 10 times...
"Number: 0
I agree with the "=" once instead of "==", still make that error.
for ( int x = 0; x < 10; x++ ); // not the semi colon shouldn''t be there
printf ( "Number: %d\n", x );
// output, only once instead of 10 times...
"Number: 0
I agree with the "=" once instead of "==", still make that error.
I don''t really make me syntzx error anymore, but then again, the things I''m working on now are pretty simplistic. I would say the most common one for me right now would be writing the wrong thing for an argument that calls for a pointer. I end up with a lot of "paramter 2 cannot be converted to type blah blah" syntax errors, when working with pointers.
I do the = instead of == a lot, and I also always make mistakes with variables in nested for loops.
-~-The Cow of Darkness-~-
-~-The Cow of Darkness-~-
mine usually result from undescriptive iterators in nested loops..
a while back i used to get alot of errors related to cyclic depenency
-eldee
;another space monkey;
[ Forced Evolution Studios ]
a while back i used to get alot of errors related to cyclic depenency
-eldee
;another space monkey;
[ Forced Evolution Studios ]

Do NOT let Dr. Mario touch your genitals. He is not a real doctor!
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement