The current C++ standard says that the standard libraries don't have the .h
at the end, but allows the .h though (depreciated I think).
So #include <iostream.h> and #include <iostream> are equivalent, although
some implementations have a difference in the use of namespaces. One thing
of note however is the C standard libraries, <stdlib.h>, <stdio.h>,
<string.h>, etc...are all libraries that came with C, but using the C++
notation they change too <cstdlib>, <cstdio>, <cstring>, etc... they all
have a 'c' in front of them, but notice the <cstring>, in C++ there is a
<string> library which is different as it defines the std::string container
intruduced with C++, whereas <cstring> has the functions strcpy(), strstr(),
strcmp(), etc...
I don't know much about using gcc from the command line, but there are
pleanty of tutorials on the web. Checkout the man pages with linux.
Hope this helps, Jason.
----- Original Message -----
From: "John Kilbourne" <jki...@po...>
To: <dev...@li...>
Sent: Thursday, December 20, 2001 8:21 PM
Subject: [Dev-C++] newbie question on header files
> How do I compile on the command line using gcc, g++, or another
> compiler , circumventing Dev-C++ (which I relly like))?.
> Specifically, I receive errors b/c of my #include statements
> (<iostream> and <string>), which I understand to be
> somehow "standard". When I use <stdio.h>, my code compiles fine.
>
> I will be moving to unix where I will only have gcc and other unix
> tools, and I am trying to get oriented to that environment.
>
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|