lundi 26 décembre 2016

String length in if-statement (C++)

I want to check if a string is longer than 3 characters but I don't get the expected result. What I've tried so far:

if (str.length() > 3)
{
    cout << "It's longer than 3 characters";
}

Aucun commentaire:

Enregistrer un commentaire