Mail Archives: djgpp/1998/11/08/08:55:08
From: | dr_drood AT SPAMTRAPgeocities DOT com
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | What`s wrong with this program? PLEASE HELP!
|
Date: | Sun, 08 Nov 1998 12:04:25 GMT
|
Organization: | We Lack Organisation
|
Lines: | 66
|
Message-ID: | <364687f9.37182612@news.3web.net>
|
NNTP-Posting-Host: | 209.197.141.165
|
Mime-Version: | 1.0
|
X-Newsreader: | Forte Agent 1.5/32.452
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
Hi
Total C++ newbie here. I just started studying C++ after getting bored
with Visual Basic, but DJGPP is choking severely on the incredibly
simple program below. The program itself is fine, but on compiling a
BUCKET load of errors appear from iostream.h. In an attempt to fix it,
I even reinstalled DJGPP all over again, and that just made even more
errors. Included below is the brain damagingly easy program. (Standard
"Hello World!" program) followed by the multitude of errors. Bearing
in mind this is the first program in the book I have, this is making
it pretty hard to learn C++. (If I had any hair left, I`d be pulling
it out.) I've tested it on a Unix box using emacs and g++ and it works
just fine, no errors on compiling.
If you could email me (removing the obvious from the address) that`d
be great, but as you're being courteous enough to help me, you don't
have to. I'll just be glad of an answer in whatever form. I've finally
motivated myself to get started on learning C++, and it chokes on the
first thing I do.:(
#include <iostream.h>
int main()
{
cout << "Hello World!\n";
return 0;
}
In file included from c:/djgpp/lang/cxx/iostream.h:31,
from C:\\temp\\test.cc:1:
c:/djgpp/lang/cxx/streambuf.h:393: `__null' was not declared in this
scope
c:/djgpp/lang/cxx/streambuf.h: In method `int
streambuf::have_backup()':
c:/djgpp/lang/cxx/streambuf.h:329: `__null' undeclared (first use this
function)
c:/djgpp/lang/cxx/streambuf.h:329: (Each undeclared identifier is
reported only
once
c:/djgpp/lang/cxx/streambuf.h:329: for each function it appears in.)
c:/djgpp/lang/cxx/streambuf.h: In method `int
streambuf::have_markers()':
c:/djgpp/lang/cxx/streambuf.h:330: `__null' undeclared (first use this
function)
c:/djgpp/lang/cxx/streambuf.h: In method `void streambuf::allocbuf()':
c:/djgpp/lang/cxx/streambuf.h:374: `__null' undeclared (first use this
function)
c:/djgpp/lang/cxx/iostream.h: At top level:
In file included from C:\\temp\\shite.cc:1:
c:/djgpp/lang/cxx/iostream.h:50: `__null' was not declared in this
scope
c:/djgpp/lang/cxx/iostream.h:91: parse error before `__extension__'
c:/djgpp/lang/cxx/iostream.h:123: `__null' was not declared in this
scope
c:/djgpp/lang/cxx/iostream.h:208: parse error before `__extension__'
c:/djgpp/lang/cxx/iostream.h:230: `__null' was not declared in this
scope
--
Something catchy should go here
- Raw text -