samedi 19 décembre 2020

Does string in C++ have no out of bound exeption/error?

string p="a";
cout<<p[4];

This piece of code doesn't give any error. Does this means the string "data type" in C++ is also not bounded as are the arrays?

Aucun commentaire:

Enregistrer un commentaire