Use the .at() function of the string
string a = "ATest";
if(a.at(0) == 'A')
cout<<"True";
else cout<<"False";
5
solved How Do I Test If The First Letter Of A String Is “A” in C++?
Use the .at() function of the string
string a = "ATest";
if(a.at(0) == 'A')
cout<<"True";
else cout<<"False";
5
solved How Do I Test If The First Letter Of A String Is “A” in C++?