This should work, but I haven't used C++ for like 2 months, so it might contain some small syntax errors. (I've been using Java lately).Code:char passwd[50]; std::cin >> passwd; If(passwd == "the actual pass"){ std::cout << "Access Granted”; } else { std::cout << "Access Denied"; }