lundi 23 décembre 2019

strlen() keeps adding p2 length value to p1 length

I'm new to C++11 and currently learning on C-style character string. I use strlen() to retrieve the length of the C-string however, it keeps adding up the length of p2 to p1 (while it should be showing correctly individual length of each one). Screenshot_1 Screenshot_2 Screenshot_3

Am i doing anything wrong?.. Thank you so much in advance for your help!

Aucun commentaire:

Enregistrer un commentaire