Hi there,
I need help with a part of my program.
Im trying to store certain values of a 3d array in another variable.
EX:
1 2 3 4 5 6 7
char buffer[20]; //to store
char abc[3][10][10]={{"hello", "thEre", "hey"},{"now","later"},{"yes","no"}};
strcpy(buffer,abc[0][1][2]); //need this to work
i want it to store the 'E' in buffer.
strcpy() takes two char* as arguments, abc[0][1][2] is a character.
&abc[1][2][3] is the address of 'E', but then strcpy() will make buffer: 'E', 'r', 'e', '\0'. You could put the null terminator at position 1 yourself and be all set.