Hi i know how to initialize a 2d array in start of program, but i want to initialize in middle, how to do that, the above program gives error.Code:for(i=0;i<strlen(string);i++) { switch(string[i]) { case 'A': case 'a': digits[i][6]={1,0,1,0,1,0}; <<<<<<<<<< DA PROBLEM break; } }
The only solve which worked is:
digits[i][0]=1;
digits[i][1]=0;
digits[i][2]=1;
digits[i][3]=0;
digits[i][4]=1;
digits[i][5]=0;
how can i do that in one go?
P.S Sorry for bad English.