TonyHarris
ISP
I am writing a program in which I need to define a class type for a bank account and I wanted to check for syntax errors as I went. The problem is I am getting errors for reasons I cannot understand. What I have below is supposed to be the first few lines which should work if there are no syntax errors. Here is what I have. I am using MS Visual C++ 6.0
#include <iostream.h>
#include "tstring.h"
class BankAccount
private:
double balance;
String accountID;
{
};
void main()
{
}
Here are the errors that I get whe I compile.
--------------------Configuration: testxx - Win32 Debug--------------------
Compiling...
testxx.cpp
C:\testxx.cpp(5) : error C2143: syntax error : missing ';' before 'private'
C:\testxx.cpp(5) : error C2143: syntax error : missing ';' before 'private'
C:\testxx.cpp(8) : error C2447: missing function header (old-style formal
list?)
Error executing cl.exe.
testxx.obj - 3 error(s), 0 warning
#include <iostream.h>
#include "tstring.h"
class BankAccount
private:
double balance;
String accountID;
{
};
void main()
{
}
Here are the errors that I get whe I compile.
--------------------Configuration: testxx - Win32 Debug--------------------
Compiling...
testxx.cpp
C:\testxx.cpp(5) : error C2143: syntax error : missing ';' before 'private'
C:\testxx.cpp(5) : error C2143: syntax error : missing ';' before 'private'
C:\testxx.cpp(8) : error C2447: missing function header (old-style formal
list?)
Error executing cl.exe.
testxx.obj - 3 error(s), 0 warning