Void in main and keeping Dos program from dying
- by TimothyTech
Alright, so im using bloodshed complier, first thing i should note is im using a
2001 edition C++ for the aboslute beginner, was there any changes to C++ since 2001 that would effect the validity of this book? i ask because i know php has php5 and now php6 but i havent seen any C++3.
now for the reason i asked that, in this code it uses,
void main (void)
why would i want an arguement to be void? what does this do.
But when i run the " void main (void) in my compiler it says that main must have a "int" before it. so i cant have "void" main (void);
also, once the code runs through, as long as there isnt a "cin" the program closes.
is this normal behavior, is there a better way to stop this besides making a cin at the end of my program.