Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • 1
    @Anguslilei char **s; this isn't a 2D array, this is a pointer to a pointer. Commented Apr 1, 2015 at 12:53
  • A total guess, std::vector<std::string>> Commented Apr 1, 2015 at 13:02
  • You never should. You should use a vector of strings. Commented Apr 1, 2015 at 13:04
  • What if I don't want to use vector, Is there any way that I could declare s in class Tool. Thank you all! Commented Apr 1, 2015 at 13:27
  • When you say you don't want to use a vector, is there a particular reason you don't want to? Strings will be much easier to manage in a vector as compared to a array of pointers to string arrays, so unless you have an incredibly good reason to not use a vector, you should do that. Commented Apr 1, 2015 at 13:36