In C++ how can I declare an array of strings? I tried to declare it as an array of char but that was not correct.
In C++ how can I declare an array of strings? I tried to declare
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
That is C++, using the STL. In C, you would do it like this:
This reads as “my strings is an array of 100 pointer to char”, and the latter is how strings are represented in C.