Subject: wxwin port (More exciting c problems)
From: [email-masked] (Keith Gary Boyce)

27 Oct 1996 09:25:10 -0800
Sender: [email-masked]
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Original-To: [email-masked]
X-PRIORITY: 3 (Normal)
X-Mailer: Chameleon 5.0, TCP/IP for Windows, NetManage Inc.
Original-Sender: [email-masked]

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 <stdio.h>
#include <iostream.h>
#include <fstream.h>
#include <stdlib.h>

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: [email-masked] (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
"[email-masked]" with one line of text: "help".