hi,
you already know about string header file so instead of using char pointers directly, its better to use the strings like this :
#include<iostream>
int main()
{
std::string userInput;
std::cout<<"Please enter the required password"<<std::endl;
std::getline(std::cin,userInput);
std::string actualPassword = "strike";
if(userInput == actualPassword)
std::cout<<"access Granted!"<<std::endl;
return 0;
}
still find out on your own how char array is different from std::string.Google is your friend.
and as already mentioned in comments, try to better your understanding of the concepts.
hope this helps !!