Declare pointers to strings

Hi, I'm a first year programmer in college and I'm in progress on a worksheet for my data structure class. The question says to declare a pointer variable called strPtr to point to an object of type string. Then, dynamically allocate the memory to store an array of 10 strings.

This is very basic i know, but i have a very bad teacher haha so if anybody could assist me with how to declare this I would appreciate it!
thank you very much R0mai! So you think this is the right response?
1
2
string * strPtr;
strPtr = new string [10];
That is precisely the right response
Topic archived. No new replies allowed.