Login Register






C++ Tutorial - Functions filter_list
Author
Message
RE: C++ Tutorial - Functions #9
You can declare the integer within the for loop statement as well, to lessen the scope of that variable, even though it's not really significant here because the function ends after the system call.

Why are you using system("PAUSE") though? There's no reason to be using a system() call here for that, and it's horrible practice to do so.

To add to what 0xDEADPIXEL had mentioned, the int main() function also doesn't require you to use the return keyword. Same thing with C99. ANSI C requires it by specification.
-- cxS

[ Haskell/.NET/C/C++ - Software Engineer ]

Reply





Messages In This Thread
C++ Tutorial - Functions - by Xiledcore - 07-26-2013, 06:26 PM
RE: C++ Tutorial - Functions - by cxS - 11-09-2013, 03:02 AM