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"};
Printable View
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.Quote:
6.7.8 Initialization
14 An array of character type may be initialized by a character string literal, optionally enclosed in braces.