There is a string
char buff[1024]; //1024 bsize = 3 // зависит от строки Receives data, add 0 to the end of the line
// добавление завершающего нуля buff[bsize] = 0; Translate string to string
string name = buff; // результат "hi" There is one more string
String test = "hi"; The question arises why the result is false? If it should be true
if(name == test) // Результат false
bsize? - 0xdb'\0'instead of0. Or you have a newline inbufgets. - andy.37Stringandstringare different classes? then everything can be. - KoVadimfor (char x : name) cout << int(x) << endl;- andy.37