How do I declare an array of strings in C++? -


How can I declare an array of strings in C ++? I tried to declare it as an array of char but it was not correct.

  #include < String & gt; Std :: string my_strings [100];  

This is C ++, using STL. In C, you will do this:

  char * my_strings [100];  

It reads as "array of my pointers to be 100 pointer", and later c.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -