Ok heres the deal, i decided to wright this simple little code were user inputs a password and has the choice to log in. Ive looked through it for syntax errors and can figure out whats wrong. Ive only been doing c++ for a couple of weeks now so its very hard for me to spot it myself.
Code:#include <iostream> #include <string> using namespace std; int main() { string access; string guess; int choice; cout<<"Please create the passcode: "; cin>>access>>endl; cout<<"Great you have now created an acount."<<endl; cout<<"Log in? Yes (1)/ No (2)."<<endl; cin>>choice; if (choice == 1){ cout<<"Please enter passcode: "; cin>>guess; if (guess == access){ cout<<"Welcome to your acount Dustin"<<endl; } else cout<<"Sorry wrong passcode, program terminating."<<endl; } else cout<<"Good bye"<<endl; return 0; }