Help pls

Help me with this pls I am trying to make an account thingy and it is meant to recognize what account you are signing into based on username

#include <iostream> int main() { std::string "reset"; reset "reset" std::string "response"; std::string "pass_entered"; std::string "account_name"; std::string "spiralzs_password"; spiralzs_password = 1234 std::cout << "write your imgflip account name here: \n"; std::cin >> account_name; if (account_name == spiralz) { std::cout << "please verify that this is you using your password"; std::cin >> pass_entered; while (pass_entered != spiralzs_password) { std::cout << "password is wrong, please try again, say "reset" to reset the process\n"; } std::cin >> response; } if (response == reset) { std::cout << "OK, resetting..."; } if (pass_entered == spiralzs_password) { std::cout << "welcome back, Master, what would you like to do? \n"; } return 0; }


If you want to create a variable and assign a value to it in one line, you can use the following template:

std::string someVar = "someValue";

If you want to create a variable, but not assign any value to it immediately, you can use the following:

std::string someVar;
//and to assign it a value later in the code, you can simply do:
someVar = "someValue";

Oh, thx for the help, I was getting kinda confused

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.