I need to store a lot of short strings with a constant length. I noticed that a string object allocates 8 bytes, even if it holds some chars, which let me run into memory trouble.
Is there a way to tell C++ that it should allocate only n (constant) bytes for the string? Or do I have to use char arrays?
sizeof(some_std_string_object) != some_std_string_object.length()