|
From: Per W. <pw...@ia...> - 2005-07-10 19:33:10
|
That book was written before the latest C++ standard update. A large number of older C include files have now received new names, such as stdio.h is renamed to cstdio.h, stdlib.h is renamed to cstdlib and so on. Second, all new C++ include files (and the old C include files hat got renamed) have dropped the ".h" extension. Third, the C++ symbols have moved into a new std:: namespace, to reduce problems with updates of the C++ standard resulting in name collisions with symbols already in use in existing software. By using the old include file names, you can still build "hello world" applications according to the old standard. However, the recommendation is that all new code should be rewritten to follow the current C++ standard. Buy following the current standard, you will have fewer problems in the future, where the size of your code increases or with future C++ standard updates. The code you supplied - with the exception of capital characters at start of a number of symbols - is correct for an old-style "hello world". The code you seem to have already received by other people will most probably be the recommended coding style for a new-style "hello world" application. /Per W |