Тип std::string
std::string theMainQuestion{"To be or not to be?"};#include <string>#include <iostream>
#include <string>
const std::string cMySecretPassword{"qwerty"};
int main()
{
std::cout << "Please, enter your password:" << std::endl;
std::string password;
std::cin >> password;
if (cMySecretPassword == password)
{
std::cout << "The password is correct!!!" << std::endl;
}
else
{
std::cout << "The password is wrong!!!" << std::endl;
}
}Last updated