What is the correct form to initialize a multiscripted array?
1-
2-Code:char names[3][11] = {{"texto1.txt"}, {"texto2.txt"}, {"texto3.txt"}};
Thanks.Code:char names[3][11] = {"texto1.txt", "texto2.txt", "texto3.txt"};
What is the correct form to initialize a multiscripted array?
1-
2-Code:char names[3][11] = {{"texto1.txt"}, {"texto2.txt"}, {"texto3.txt"}};
Thanks.Code:char names[3][11] = {"texto1.txt", "texto2.txt", "texto3.txt"};
Both of those forms.6.7.8 Initialization
14 An array of character type may be initialized by a character string literal, optionally enclosed in braces.
7. It is easier to write an incorrect program than understand a correct one.
40. There are two ways to write error-free programs; only the third one works.*