From: garp AT opustel DOT com (Keith Gary Boyce) Subject: wxwin port (More exciting c problems) 27 Oct 1996 09:25:10 -0800 Sender: daemon AT cygnus DOT com Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Original-To: gnu-win32 AT cygnus DOT com X-PRIORITY: 3 (Normal) X-Mailer: Chameleon 5.0, TCP/IP for Windows, NetManage Inc. Original-Sender: owner-gnu-win32 AT cygnus DOT com Does any one understand why I am getting following errors compiling program below? bash$ gcc -I/usr/lib/g++-include -o garp.exe garp.c In file included from /usr/lib/g++-include/iostream.h:31, from garp.c:2: /usr/lib/g++-include/streambuf.h:35: syntax error before string constant In file included from /usr/lib/g++-include/iostream.h:31, from garp.c:2: /usr/lib/g++-include/streambuf.h:37: syntax error before `}' bash$ Here's the simple program i'm trying to compile #include #include #include #include main () { ofstream outfile("/tmp/foo2.dat", ios::out); if (!outfile) { cerr << "File could not be opened" << endl; exit(1); } cout << "Enter acct, name and balance" << endl << "Enter to finish" << endl << "? "; int account; char name[10]; float balance; while (cin >> account >> name >> balance) { outfile << account << ' ' << name << ' ' balance << endl; cout << "? "; } return 0; } ------------------------------------- Name: Garry Boyce E-mail: garp AT opustel DOT opustel DOT com (Garry Boyce) Date: 12/01/94 Time: 08:46:10 This message was sent by Chameleon ------------------------------------- - For help on using this list, send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".