delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/21/05:45:24

From: ngc7000 AT gong DOT snu DOT ac DOT kr (Kim,Young-Jae)
Newsgroups: comp.os.msdos.djgpp
Subject: [Q] Can djgpp compile the C++ source ???
Date: Wed, 21 Jan 1998 10:31:35 GMT
Organization: Turbomachinery Lab. Seoul Nat'l Univ.
Message-ID: <34c7ce4e.2169674@news.kreonet.re.kr>
NNTP-Posting-Host: dpurple.snu.ac.kr
Mime-Version: 1.0
Lines: 33
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi all...
I'm a beginner of DJGPP...
I've received some binary files in http://www.delorie.com/dgjpp
and installed to the directory c:\djgpp, and done all things in the
web page describing to install...
And I typed some source file and command to compile it...
c:\> gcc arraynew.cpp -o arraynew.exe
but it reports various error message, which says it cannot load
"iostream.h"...
I've found that "iostream.h" is in the directory "c:\djgpp\lang\cxx"
not in the directory "c:\djgpp\include"...

The following is my source code...

Plz, let me know whether djgpp can compile C++ code or not !!!


#include <iostream.h>
int main(void)
{
	double *p3 = new double[3];
	p3[2] = 0.2;
	p3[1] = 0.5;
	p3[0] = 0.8;

	cout << "p3[1] is " << p3[1] << ".\n";
	p3 = p3+1;
	cout << "Now p3[0] is " << p3[0] << ".\n";
	cout << "p3[1] is " << p3[1] << ".\n";
	return 0;
}


- Raw text -


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