* error while cout command compiling
@ 2003-07-04 19:42 ehab samir aziz
0 siblings, 0 replies; 2+ messages in thread
From: ehab samir aziz @ 2003-07-04 19:42 UTC (permalink / raw)
To: gcc-help
Error :
//------------
# gcc part01-iti-r01-ch01-1_10-identifers01.c
In file included from
part01-iti-r01-ch01-1_10-identifers01.c:1:
/usr/local/include/c++/3.2.3/backward/iostream.h:32:20:
iostream: No
such file or directory
In file included from
part01-iti-r01-ch01-1_10-identifers01.c:1:
/usr/local/include/c++/3.2.3/backward/iostream.h:34:
syntax error
before "std"
part01-iti-r01-ch01-1_10-identifers01.c: In function
`main':
part01-iti-r01-ch01-1_10-identifers01.c:9: `cout'
undeclared (first
use in this function)
part01-iti-r01-ch01-1_10-identifers01.c:9: (Each
undeclared identifier
is reported only once
part01-iti-r01-ch01-1_10-identifers01.c:9: for each
function it
appears in.)
source code:
//-----------
#include
"/usr/local/include/c++/3.2.3/backward/iostream.h"
int i=2;
static int si;
const int ci=2;
struct { int i,j;} s={21,22};
int main(void)
{
int j=11;
cout << s.j;
return 0;
}
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: error while cout command compiling
@ 2003-07-06 2:37 Wayne
0 siblings, 0 replies; 2+ messages in thread
From: Wayne @ 2003-07-06 2:37 UTC (permalink / raw)
To: gcc-help
You might try, instead of trying to use the deprecated version
of iostream.h, to do something like this:
#include <iostream>
using namespace std;
int i=2;
static int si;
const int ci=2;
struct { int i,j;} s={21,22};
int main(void)
{
int j=11;
cout << s.j;
return 0;
}
Also, make sure that you compile with g++, not gcc....
Wayne Keen
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-07-06 2:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-04 19:42 error while cout command compiling ehab samir aziz
2003-07-06 2:37 Wayne
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).