dimanche 4 septembre 2016

fixed size string type container

I need a fixed size string type for certain requirements. For now I've been doing a simple char[20] array of characters to meet this requirement. However, it is lacking certain stl container-friendly properties that I require now and then. For eg a simple empty(), clear() methods are required quite frequently and also the length/size property or getSize() method that might return this property or the ability to not manage '/0'. Not the actual size, but the size of string that fills the container.

Now I know I can reimplement all this and I might in the future when I get some time, but for now is there another way to achieve this?

Aucun commentaire:

Enregistrer un commentaire