0

How I do a char array with 2 Index in C?

I have one char array, in the first moment i need a char with only Index, so this char array os overwriten with positions, but in this case, i need to do an char array with 2 Index, because its looks like an spreadsheet, I want this files in one file .dat . https://code.sololearn.com/cjoqlD1VvlNG/?ref=app

12th Jun 2019, 5:56 PM
Isaac Muniz
Isaac Muniz - avatar
2 odpowiedzi
+ 1
If you want a multidimensional array, you just need to add a dimension such as: char multidim[2][4]; // 2*4 array For static arrays, you either need to specify the size or the content (so that the compiler can deduce the size) Your variable "i" is not defined, such as your type Arrayp
24th Jul 2019, 9:25 PM
Baptiste E. Prunier
Baptiste E. Prunier - avatar
+ 1
Reading more carefully your code, I do not think you need a multidimensional array, but just a mono dimensional array, and in this case, only the size is missing
24th Jul 2019, 9:26 PM
Baptiste E. Prunier
Baptiste E. Prunier - avatar