I need a structure as follow:
The structure must hold fixed size std::strings so that the number of its elements is finit (100 - 10000000).
I would like to be able to access each element randomly as follow:
std::string Temp = MyStrcuture[i];
or
MyStrcuture[i] = std::string Temp;
I have to use the fastest structure with no (possibly) memory leak.
Which one is better for me?
- std::string* MyStrcuture = new std::string[Nu_of_Elements];
- std::queue< std:string> MyStrcuture(Nu_of_Elements);
- std::vector< std:string> MyStrcuture(Nu_of_Elements);
- boost::circular_buffer< std::string> MyStrcuture(Nu_of_Elements);
- Your suggestion?

 
     
     
     
    