this runs but with unexpected results,why?I insist on using cin.getline
and I was hoping if statement will execute, however the else statement is da one dat executes.
As for the question I think the first answer is correct
char name[256];
cout <<"enter name"<<endl;
cin.getline(name, 256);
if (name == "My boy")
cout <<"Hello, My boy!"<<endl;
else
cout <<"Hello, My Girl"<<endl;