delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/31/23:02:47

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: "std::" doesn't compile
Date: Sat, 31 Jan 1998 22:48:11 -0500
Organization: Two pounds of chaos and a pinch of salt.
Lines: 27
Message-ID: <34D3F07B.795C@cs.com>
References: <6b00ni$c8q$1 AT winter DOT news DOT erols DOT com>
NNTP-Posting-Host: ppp207.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Yeeming Jih wrote:
> 
> #include <iostream>
> 
> int main()
> {
>  std::cout << "Hello, world!\n";
> }
> 
> Well, it doesn't compile because DJGPP's compiler cannot find a file called
> "iostream." Even if I add ".h" the compiler will complain about std not
> found.

1) There is no "iostream" in DJGPP.  Try iostream.h.

2) There is no such thing as "std" either.  'cout' is a global object.

3) If this is what your book is teaching you, throw it out.  But I
thought Stroustrup was better than that.

-- 
---------------------------------------------------------------------
|      John M. Aldrich       | "Animals can be driven crazy by pla- |
|       aka Fighteer I       | cing too many in too small a pen.    |
|   mailto:fighteer AT cs DOT com   | Homo sapiens is the only animal that |
| http://www.cs.com/fighteer | voluntarily does this to himself."   |
---------------------------------------------------------------------

- Raw text -


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