delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/11/29/19:38:49

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Date: Mon, 29 Nov 2004 19:38:23 -0500
Message-Id: <200411300038.iAU0cNhl023816@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp AT delorie DOT com
In-reply-to: <000a01c4d61b$340c5120$ef2da653@johvi.vnet.ee> (alekst@hot.ee)
Subject: Re: HELP, plz ...
References: <000a01c4d61b$340c5120$ef2da653 AT johvi DOT vnet DOT ee>
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> #include <iostream.h>
> int main () {
> cout << "test" << endl;
> return 0;
> }

This is an invalid program.  Try:

#include <iostream>

using namespace std;

int main(void)
{
  cout << "hello" << endl;
  return 0;
}


> comp. string:
> gcc test.cpp -o test.exe -Wno-deprecated

This is the wrong command line.  For C++ programs, use the C++ compiler:

g++ test.cpp -o test.exe

(or gxx for DOS systems)

- Raw text -


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