delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/01/28/20:41:49

Xref: news2.mv.net comp.os.msdos.djgpp:619
From: Erik Max Francis <max AT alcyone DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: What the??
Date: Sun, 28 Jan 1996 14:41:13 -0800
Organization: &tSftDotIotE
Lines: 41
Message-ID: <310BFB89.5F7E8E74@alcyone.com>
References: <822863893snz AT trenham DOT demon DOT co DOT uk>
NNTP-Posting-Host: newton.alcyone.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Peter Cooper wrote:

> I downloaded all the stuff for DJGPP and unzipped them and they created
> their own directories like /BIN /LANG etc.. so I decided to write a program.
> so...
> 
> #include "iostream.h"
> void main(void) {
>         cout << "hi!\n";
> }
> 
> and went                   gcc file.cc
> The error came back:       IOSTREAM.H Cannot find filename or directory

This is because iostream.h is not in the current directories.  iostream.h is a
standard header, and so should be included as

    #include <iostream.h>

> so the program changed to:
> 
> #include "c:\djgpp\lang\cxx\iostream.h"
> void main(void) {
>         cout << "hi!\n";
> }
> 
> and then after that this error came up..
>                            SOMETHINGELSE.H Cannont find filename or \
> directory

This is because the backslash means special things in a C string.  You need to
escape the strings, as in:

    #include "c:\\djgpp\\lang\\cxx\iostream.h"

-- 
Erik Max Francis, &tSftDotIotE. && max AT alcyone DOT darkside DOT com || max AT alcyone DOT com
San Jose, California, U.S.A. && 37 20 07 N 121 53 38 W && the 4th R is respect
H.3`S,3,P,3$S,#$Q,C`Q,3,P,3$S,#$Q,3`Q,3,P,C$Q,#(Q.#`-"C`- && 1love && folasade
Omnia quia sunt, lumina sunt. && GIGO Omega Psi && http://www.alcyone.com/max/
"Out from his breast/his soul went to seek/the doom of the just." -- _Beowulf_

- Raw text -


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