I am having great difficulty getting this code to work.
Am I missing something simple? It compiles fine, but I cannot determine where the error is coming from. I'm using VC++ 6.Code:#include <string.h> #include <stdio.h> void main(){ const int numsqu=30; char square[numsqu][numsqu]; int i=0, x=0; for (i = 0;i<numsqu;i++){ for (x = 0;x<numsqu;x++){ square[i][x] = ' '; } } char row[numsqu][numsqu]; char tempp[numsqu]; for (i = 0;i<numsqu;i++) sprintf(row[i],"\0"); for (i = 0;i<numsqu;i++){ for (x = 0;x<numsqu;x++){ sprintf(tempp,"%s",row[i]); sprintf(row[i],"%s%s \0",tempp,square[i][x]); //Problem Code! } } }
Thanks for any help,
chilibean




Reply With Quote