It's incorrect writing std::string. Sizeof(std::string) is always _x_ and doesn't depend of length