delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/06/10/06:30:07

From: adsgohere AT durchnull DOT de (Rudolf Polzer)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: can't use cout?
References: <z8nU6.14958$y7 DOT 129427 AT dbsch1 DOT home DOT nl> <992084850 DOT 568529 AT queeg DOT ludd DOT luth DOT se> <XWnU6.15276$y7 DOT 131590 AT dbsch1 DOT home DOT nl>
X-DAUs: lesen Headers, ohne zu wissen, was das ist
X-Homepage: http://www.durchnull.de
User-Agent: slrn/0.9.6.3 (Linux)
Date: Sun, 10 Jun 2001 14:03:24 +0200
Message-ID: <cmnvf9.0bg.ln@durchnull.de>
Lines: 36
NNTP-Posting-Host: 213.6.42.120
X-Trace: 992168389 news.freenet.de 29362 213.6.42.120
X-Complaints-To: abuse AT freenet DOT de
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Dave Lemmens <dave AT dl-mail DOT dhs DOT org> wrote:
> Error: 'cout' undeclared (first use this function)
> 
> so it looks like he thinks it's a variable.

1. <io.h> is wrong - use <iostream> (without .h)
2. use std::cout (or write under the #include: using namespace std)

> 
> "Martin Str|mberg" <ams AT father DOT ludd DOT luth DOT se> wrote in message
> news:992084850 DOT 568529 AT queeg DOT ludd DOT luth DOT se...
> > Dave Lemmens <dave AT dl-mail DOT dhs DOT org> wrote:
> > : I used DJGPP + RHIDE before, it worked great!
> > : But now I want to compile a program (very easy one)
> > : it doesn't work.
> >
> > : Example:
> > : __________________________
> > : #include <io.h>
> >
> > : int main()
> > : {
> > : cout << "test";
> > : return 0;
> > : }
> > : ___________________________
> > : This doesn't work ;-(((
> >
> > Define "doesn't work" and "work".


-- 
#!/usr/bin/perl -- Random sig generator. Editor command in slrn => ~/siggs
$F=shift;open H,"+<$F";$_=join"",<H>;$s=index$_,"\n\n-- \n";$s<0||truncate
H,$s;close H;system"$ENV{EDITOR} $F</dev/tty>/dev/tty";$s=$n=0;for#sichtig
(<~/siggs/*>){++$n;int rand$n or$s=$_};`(echo "\n\n-- ")|cat - $s>>$F`+nan

- Raw text -


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