#include <iostream>
#include <string>
using namespace std;
class Account {
public:
Account(): balance(0.0) {};
inline bool checkpass(string number, string password) {
// some way to check number and pass
return 1;
}
inline float GetBalance() { return balance; };
// and so on ...
private:
float balance;
};
int main(void) {
Account Account1;
string num, pass;
cout << "\n Input account number: ";
cin >> num;
cout << "\n Input password: ";
cin >> pass;
if(Account1.checkpass(num, pass))
cout << "\n Login successful!\n";
else
cout << "\n Error, try again!\n"; // you'll never see this :-)
return 0;
}
This is some equivalent to your code. The division in files I leave to you. ;) Be careful how you initialize an object of the class and how you call a member function through it. This is where your error comes from.