Does it really works? I don't thinks so. Anyway maybe you need this:
Originally Posted by Jakob
With this line
using namespace std;
you defined array of 10 pointers to type char.
If your intetnion was to do this then you must first allocate memory otherwise you'll get a seg. fault
So correct version would be:
when using *stra that means you use stra in this case.
stra = new char; //allocate enough memory to store 10 character
//or strcpy(stra, "hallo");
I repeat I don't know if your intetion was to define array of pointers to type char in the first place. Did you want to define array of C strings?