3 ms·
I remember when I was learning to program in C I once put a semi-colon on the end of a #define. Statements end in semi-colons, seemed like a fine thing to do an
by FigBug 12y ago
I remember when I was learning to program in C I once put a semi-colon on the end of a #define. Statements end in semi-colons, seemed like a fine thing to do and didn't stand out when I was looking for the error. The compiler errors were of no help. It took days to find.
It took a long time to learn to read errors messages and interpret them for what the actual problem is. Forgetting the semi colon on the end of a class in C++ is another one that will making baffling errors, though I think most modern compilers now say "did you forget a semi colon?"
It takes time to learn all these common simple errors that are impossible to look up in a reference book. (Though now you can usually google them)
I remember getting so frustrated that I couldn't figure out how to cast a function pointer to a C API correctly in C++ correctly that I gave up and switched the entire project to C.
These are the only onse that really stick out in my mind, but there were many more.