+ 2

How to initialize 5 strings of 3 characters ? don't want to declare 5 strings but one ?

8th Jun 2017, 6:36 PM
Zineb Ab
Zineb Ab - avatar
3 odpowiedzi
+ 15
sth like that? char** str = new char*[5]; for (int i =0; i<5; i++) str[i] = new char[3];
8th Jun 2017, 6:58 PM
Drinker
Drinker - avatar
0
we use ...=new. . in C langage 😯
8th Jun 2017, 7:06 PM
Zineb Ab
Zineb Ab - avatar
0
This allows Dynamic Allocation of space @zineb
12th Jun 2017, 11:29 PM
Mruthyunjaya Rao Padamata
Mruthyunjaya Rao Padamata - avatar