redeclation even tho ive removed the other
its saying that ive redclared it and i already saved it but it still says that ive redclared it its at line 12 related to line 24
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
#include <iostream>
using namespace std;
class database{
private:
int choice;
string acc,pass,add,delte,modify;
//Authentication
string logging = "gabbz29";
int pass = 387025;
public:
void menu();
};
void database::menu(){
//Authentication
cout << "Enter your account name: ";
cin >> logging;
cout << "Enter your password: ";
cin >> pass;
while(!(logging == "gabbz29" || pass == 387025)){
cout << "Check the information that you provided and try again.\n\n";
cin.clear();
cin.ignore(100 , '\n');
cout << "Enter your account name: ";
cin >> logging;
cout << "Enter your password: ";
cin >> pass;
}
//Main menu
cout << "--------------Database Menu--------------\n";
cout << "Add an account.\n";
cout << "View your accounts.\n";
}
int main(){
database alldata;
alldata.menu();
}
| |
So what's that string called pass on line 8 doing?
Topic archived. No new replies allowed.