Message-Id: <5.1.1.6.0.20020923181520.00be2b48@imss.gob.mx> X-Sender: jlsgarrido AT mail DOT SoftHome DOT net (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 5.1.1 Date: Mon, 23 Sep 2002 18:32:32 -0500 To: djgpp AT delorie DOT com From: "J. L." Subject: Re: questions/help with c++ compiling In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk At 06:10 p.m. 23/09/2002 -0400, you wrote: >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: This tutorial is outdated. Consider get a recent (and decent) C++ book :) Maybe http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html >#include This is deprecated. Better use #include use namespace std; >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 Are you coding C++ or C? For C++ files, use .cpp extension, and type at command line. gpp hello.cpp -o hello.exe [snip] >I mearly receive the error message, "Program too big to fit in memory" >when I attempt to run it. Maybe your system needs to be configurated. See FAQ sec. 3.9 at http://www.delorie.com/djgpp/v2faq/faq3_9.html >So here're my quetions: > >1) Am I at least using the correct command/syntax to compile a c++ program? No. >2) It's obviously done something with hello.cpp, but what exactly did gpp >do, and what then is the hello.exe file? Do you use gpp? >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.? See above. >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 You're welcome. Regards J. L.