Avatar of Unimatrix_001
Unimatrix_001
Flag for United Kingdom of Great Britain and Northern Ireland

asked on 

sizeof(std::string) always 32.

Hello,

Irrelevant of what std::string is set to, I permanently get 32 as the size, why is this and why does the size and length methods both ignore the null byte, giving the same result even if there isn't one? Similarly, do I take it std::string manages the null byte itself as I never appear to have any problems with it not being null terminated?

Thanks,
Uni
C++

Avatar of undefined
Last Comment
Unimatrix_001

8/22/2022 - Mon