Date: Mon, 3 Feb 1997 00:52:42 -0500 (EST) From: Michael Phelps To: Deez Nutz cc: djgpp AT delorie DOT com Subject: Re: "HELLO WORLD!" C++ Programming Error with Djgpp? In-Reply-To: <32f55207.1140784@news.akula.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 3 Feb 1997, Deez Nutz wrote: > I am starting on learning C++ using DJGPP and I am having problems. I > have downloaded the lgp and gpp files for C++ and I have had previous > success in running simple programs like "Hello World!" In C > previously. However, In reading a book entitled "C++ Programming 101" > by Sams Publishing, I have not been succesful in do such simple > programs in c++: > > This is the following C++ syntax that I type: > > // Filename hello.cpp Displays Message > #include > void main() it's best to use int main() > { > cout << "Hello World!"; > } > > I then compile as so: > > C:\>gcc hello.cpp -o hello > Use gxx hello.cpp -o hello.exe instead. (Compile with gxx whenever you use C++ and it will automatically take care of the "undefined reference to 'cout'" error messages and such.) > > I then get an error regarding the main function. I cant recall what > exactly the error is but If someone can help I would appreciate it. > Thank You. > > > ---Michael Phelps morphine AT cs DOT jhu DOT edu CH3 | N / | ______/ | / \ CH2 _____/ \__|__ // \\ / | \\ // \\______/___CH2 \\ \ / \ / \______/ \_____/ / ------ \ / \ OH \ / OH O Morphine