mercredi 2 mars 2016

C++ if not working

My if statement in a c++ console application is not working:

string line;
cin >> line;

if (line == "a b"){
    cout << "lalala";
}

When I type "a b" nothing happens.
if i use if (line == "ab") and type ab it works.

Aucun commentaire:

Enregistrer un commentaire