#include <cstdlib> #include <iostream> #include <windows.h> using namespace std; int hp=100; char start[20]; void draw() { system("color 7"); } void enter_start(){ cout <<"Добро пожаловать в CPP Wars!" <<endl; cout <<"Введите 'Start' для начала игры" <<endl; cin >>start; cout <<"Начинаем игру!" <<endl; system("cls"); } void game(){ cout <<"У вас " <<hp <<" делаем ход" <<endl; if (rand()% 2 == 0) { system("color a"); cout <<"Вас ударили -1 hp!" <<endl; hp-=1; Sleep(2000); system("cls"); } else { system("color c"); cout <<"Вы восстановили силы +1 hp" <<endl; hp+=1; Sleep(2000); system("cls"); } } void check(){ if (start=="Start") { game(); } else { cout <<"Команда введена не верно! Повторите попытку " <<start <<endl; } } int main() { setlocale(LC_ALL, "Russian"); while(hp > 0){ draw(); enter_start(); check(); } system ("color 4"); cout <<"Игра окончена" <<endl; cout <<"Вы умерли..." <<endl; return 0; } The check() function for some reason does not work, when you enter "Start" it still displays a message stating that "Команда введена не верно!" I can not understand where I was wrong, I ask for your help!