In my void main I wrote this:
b1.setnum(int n);
n=b1.getnum();
Here is the class and the methods
class Account
{
private:
int num;
int type;
float balance;
public:
void setnum(int n);
void settype(int t);
void setbalance(float b);
int getnum();
int gettype();
float getbalance();
};
1.make sure the #endif statment in the account.h is not standalone, ie there is a maching #ifdef statment at the beginning of the file.
2. Instead of using this
//This is wrong, as you don't have to specify the argument
//type, in this case int, when you call a method or a
//function
b1.setnum(int n);
n= b1.getnum()
use
int n;
n= (set it to something);
b1.setnumb(n);
n=b1.getnumb();
2. Instead of using this
//This is wrong, as you don't have to specify the argument
//type, in this case int, when you call a method or a
//function
b1.setnum(int n);
n= b1.getnum()
use
int n;
n= (set it to something);
b1.setnumb(n);
n=b1.getnumb();