Hi,
i have a problem with dynamically allocated strings...
I hope it's ok, if i post this in the C forum though i am using the "new"-keyword (beacuse char* = C-style)
First the code:
This should allocate 20 strings a 200 bytes.Code:char **mult = new char*[20]; for( int i = 0; i < 20; i++ ) *( mult + i ) = new char[200];
If i try this, for example-
-my program crashes. Strcpy or any other code using this array, crashes, too... How do i access one char or a string from the array not fsckig the program? (please post code)Code:*( *( mult + 1 ) + 5) = 'a';
thanks.