[c++] How to get length of a string using strlen function