www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/12/10/05:44:44

To: djgpp AT delorie DOT com
Subject: How do I use iostream?
Message-ID: <1039517050.3df5c57a5be0d@webmail.student.uu.se>
Date: Tue, 10 Dec 2002 11:44:10 +0100 (CET)
From: Par Matsson <Par DOT Matsson DOT 3749 AT student DOT uu DOT se>
MIME-Version: 1.0
User-Agent: IMP/PHP IMAP webmail program 2.2.3
X-Test: <%$from%>
X-Originating-IP: 130.238.35.235
Reply-To: djgpp AT delorie DOT com

Hi!
I've recently downloaded djgpp using the zip-picker on delorie.com, and unzipped
all files using unzip32.exe. I am running win2000, and I have installed the c++
zip file as well as all other zip files i was recommended.

The program i was trying to compile was:

#include <iostream>
int main()
{
cout << "Hello!\n";
return 0;
}

I have been trying different command lines:

gcc -c -Wall hello.cc
gcc -x c++ hello.cc
gcc -c hello.cc -lgpp
gxx hello.cc -o hello.exe
gxx -c -Wall hello.cc
gcc -c -Wall hello.cc -lstdcxx

but everytime I just get error messages:

hello.cc: In function 'int main()':
hello.cc:5:'cout' undeclared (first use this function)

What should I do, I mean this should be quite a simple program...

Thank you!

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019