That's why it's a good practice to comment closing curly braces for the long blocks: while (1) { } // end of while
Fixing C
121–123 of 123 posts
Re: Fixing C
#122That's why it's a good practice to comment closing curly braces for the long blocks: while (1) { } // end of while
But before you do that, try pulling out functions.
Re: Fixing C
#123Earlier quoted context omitted.
Now, at one point, you stopped talking about arrays and started talking about pointers.
That's because C tosses out all of that array state information at the drop of a hat once you start passing them around to functions. Worse, it's an easy way to get burned on the sizeof() function, especially if you at some point refactor the code and put that chunk in a function separate from the original declaration. This is why C programmers get gunshy about relying on that information and instead just treat strin…
Good programmers do nothing of the sort.