Mail Archives: djgpp/2002/09/23/18:10:26
Hello everyone. I'm sure this will be the first of many questions as I
embark upon my programming adventure :)
Okay. Here's my scenario:
As I said in my recent hello letter, I took a few programming classes in
high school so I hope to pick up the syntax and commands rather quickly.
I've been reading through the Programming in C++ tutoral at
http://www.cprogramming.com/tutorial.html. Lesson one gives the example:
#include <iostream.h>
int main()
{
cout<<"HEY, you, I'm alive! Oh, and Hello World!";
return 0;
}
After having entered the preceeding code and having saved it as hello.cpp, I
wish to compile it. Refering to the online users' guide at
http://www.delorie.com/djgpp/doc/ug/basics/compiling.html, I enter:
gcc hello.c -o hello.exe
I am then greeted with:
In file included from c:/djgpp/lang/cxx-v31/backward/iostream.h:31,
from c:/djgpp/new/hello.cpp:1:
c:/djgpp/lang/cxx-v31/backward/backward_warning.h:32:2: warning: #warning
This file includes at least one deprecated or antiquated header. Please
consider using one of the 32 headers found in section 17.4.1.2 of the C++
standard. Examples include substituting the <X> header for the <X.h> header
for C++ includes, or <sstream> instead of the deprecated header
<strstream.h>. To disable this warning use
-Wno-deprecated.
Well, that's all well and good... How I understand it is that iostream.h may
be old, but still usable. And there is a hello.exe, so gpp at least did
something with my code. Unfortunately, it's some "ungodly size" at
577,795bytes, and will not execute. I mearly receive the error message,
"Program too big to fit in memory" when I attempt to run it.
So here're my quetions:
1) Am I at least using the correct command/syntax to compile a c++ program?
2) It's obviously done something with hello.cpp, but what exactly did gpp
do, and what then is the hello.exe file?
3) If I were to use a "non-depreciated" header, like gpp suggests, which is
the iostream.h equivelant... and does the new .h still use the functions
cout, cin, etc.?
I want to say thanks for your help in advance. I admit to being a "newbie,"
but hey, we've all got to start out somewhere, and with brain like a sponge,
I'm eager and willing to learn. :)
-Tim
_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com
- Raw text -