I am quite new to c++ and i'm having trouble with strings. I know how to declare strings through an array of characters but for some reason they dont seem to work properly. I made the following program to illustrate my problem with strings.
#include <iostream>
using namespace std;

int main ()
{
char secret_code [] = "comehere";
char guess [15];

cout << "please enter the secret code to enter: \n";
cin >> guess;


if (guess == secret_code)
{
cout << "please enter programmer\n\n\n";
}
else
{
cout << "that is incorrect, go home...\n\n\n";
}
return 0;
}

for some reason, once i input the answer to the code it skips to the else portion of code and fails to read the secret_code. I tried various methods such as using the cin.getline() function or the cin.get(). They all have failed. can someone please help me correct this code so i understand what im doign wrong, thanks.