In C++, you should include <cstdio> rather than <stdio.h>. Additionally,
mixing of stdio and iostream is not recommended, especially if you're going to
use them both on the same stream.
Levi
On Wed, 23 Oct 2002 16:53:58 -0500 (CDT)
John Dahlstrom <[EMAIL PROTECTED]> wrote:
> While 3.2.1-0pre3 works fine, 3.2.1-0pre4 fails.
> Given input file test.cpp:
>
> #include <stdio.h>
> #include <iostream>
> using std::cerr;
> using std::endl;
>
> int main()
> {
> fprintf(stderr, "test\n");
> fflush( stderr );
> cerr << "test" << endl;
> }
>
>
>
> $ g++ test.cpp -o test
> In file included from test.cpp:1:
> /usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h:55: syntax error before
> `
> typedef'
> /usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h:60: `FILE' was not
> declared
> in this scope
> /usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h:71: parse error before `
> typedef'
> In file included from test.cpp:1:
> /usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h:97: syntax error before
> `
> typedef'
> /usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h:103: syntax error before
> `
> typedef'
> In file included from test.cpp:1:
> [...]
>
>
> --
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
>
--
Levi Bard
[EMAIL PROTECTED]
http://bard.sytes.net
GooSNES - Lightweight, featureful GTK+ snes9x frontend -
http://bard.sytes.net/goosnes/
TakCD - highly embeddable commandline cd player - http://bard.sytes.net/takcd/