I want to declare an array of type (char / string) confused! dunno which one.. which will store 5 names
this code couldnt work
someone guide me please
The problem with your code is that the "strings" aren't string literals, so they're treated as identifiers that don't exist. Further, the type of your array is char, which means each element of the array can hold one character and no more.
To hold multiple characters, the type of the array needs to be a char* that points to a string literal or dynamic memory, an array of char (ie. a 2D array), or an array of std::string as in my example above. The latter provides the most flexibility by far, and that's why it's recommended.