Runtime libraries installation
I installed the new Beta version 2 of MS Visual Studios 2005. I then installed the runtime libraries for 2005. However, when I include "#include <iostrem.h>" it doesn't seem to compile it saying it cannot find it?
I looked at the runtime libraries and iostream.h is a file called iostream. Not iostream.h? This is funny to me, since in v6.0, it is iostream.h according to memory.
I then installed the 2003 libraries in the hope that this might resolve the problem. However it did not.
Unlike the 2003 or v6.0 environments, the I am unclear on how to set the path for librarires, include files, etc, on the beta version; and am unclear on how to install STL, runtime libraries, include fields etc. If anyone can give me some help e.g. a step by step process of how to install the runtime libraries that would be of much help.
A .C file will compiler with that, but C++ should use <iosteam> without the h
6.0 was in a transition period where both work.
The stl should be included (part of the compiler, you do nothing I mean)
#include<iostream> //no .h, some of them have a c in front like cmath
using namespace std; //namespace of the language so you can have your own cout
in a differernt namespace without compiler errors.
Last edited by jonnin; 07-18-2005 at 09:51 AM.
Forget about all .h standard headers -- they were removed from C++ only 11 years ago:) In standard C++, all standard headers are in the form of <header> and the C libraries are in the form <cheader> for example:
Originally Posted by Rahul Dixit
<cmath> //formerly: <math.h>
The difference between the deprecated <header.h> file and their modern replacement <header> isn't just cosmetic. The new headers declare their components in namespace std and in most cases, they are more generic and STL-compatible. Please don't reinstall old libraries -- there's no point in starting a new project on the wrong foot. Simply get used to the standard C++ header naming conventions.
On that note, Ive seen some people making their headers extensionless, usually these sort of programmers add a folder to the compiler so the thing looks like <myheader> ..
Is there a take on this? I prefer quotes, and the .h, to tell the reader that its not part of the language. <> with a .h means library to me, quotes with a .h means source code that I can get at, and <> and no h is part of the language. But thats MY take on readibility -- is there a convention emerging in this area?
Yes there is. First of all, all non-standard headers shouldn't use < brackets but double quotes:
If the file system supports extensionless files,
Should work but too many IDEs I know will break if they can't see a proper extension of a header file. Officially however, it's allowed as long as you don't use <>.
So your not a fan of adding an 'include' folder to the compiler and using <>
Good, I don't care for that either. I can deal with .h or no .h but find not having it to be less than helpful. How do you grep all the headers if nothing has an extension?
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center