it's out of date because it uses iostream.h, not because it uses void main. The latest standard has its header files without the '.h' at the end, and it would use the std:: namespace. void main is just bad practice; you can have bad practice and the latest standard (I know, shocked me too!)

EDIT: although to tell you the truth for starters using void main is good practice; the programs are always extremely small, and the reader may get confused because he/she probably won't know what the return means. It seems best to start off with the simplest programs possible, and then include the nifty $$$$!

it's not always such a bad thing,and to tell you the truth the only reason a lot of people say its a bad thing is because bigger/beefier programmers say its a bad thing. But if main returns an integer, then you know for an absolute fact that program execution got to the end of the function. What if for some reason your program goes into an endless loop. If your main doesn't return a value, how do you know what it's doing?

Why do you use void main()? Because the standard says so. For all you non-ASM programmers, any integer value is returned from a function in the register eax (in x86). So, in a void main(), that eax could be anything in the world, probably something left over from an operation. If you specify int main(), you can in C/C++ set the return value in eax. That way, you're not sending back to the runtime some rubbish number.

This line of code I found in the MS runtime for C/C++. If you take a look those sources you'd find many interesting things, really! Anyways, there are a lot of these "versions of this line of code." Here's just one of them; it implies that main return something: