i have a problem about a three dimensional-array. how do you assign a null-string to the array??
hier is the declaration of the array and the strcpy-function:
1 2 3 4 5 6 7 8 9 10 11 12 13
char namen[7][100][200];
...
//voor elke layer in de array
for(laycount=1;laycount<=6;laycount++)
{
//voor elke rij in de array
for (rowcount=1;rowcount<=100;rowcount++)
{
//reset elke string naar een null-string
strcpy(namen[laycount][rowcount] ,"");
}
}
...
Your for indices are wrong. You're not iterating over element 0.
Be careful with multidimensional arrays. They're just 1D arrays which the compiler performs a little offset arithmetic on. For example, your code is equivalent to this: