+ 1
Is there possible to create an 2-D character array in c++
C++
5 ответов
+ 11
/* I'm not that good in cpp but this is how we do it I guess : */
int main() {
char foo[2][3] = {{'a','b','c'}, {'d','e','f'}};
cout<< foo[1][0];
return 0;
}
+ 5
@Dayve's answer is correct. If it still throws an error on desktop, please post your entire code.
0
I tried it on visual studio 2010 ultimate bt it gives me an error...
0
Dayve I want to take an input from user and as well as dynamic memory allocation..... please try it....