The first problem you have, is that you're compiling this code using C++ compiler
How can I tell?
Because the struct GAME syntax (more specifically your use of it later on without the struct keyword is only valid in C++).
The other problem is that you've buried your array inside a structure. Now whilst arrays are passed as pointers, arrays inside structs are copied, so any changes in setblank are not copied back to main.
Code:
#include <stdio.h>
#include <string.h>
/*Data Structures*/
/* Without changes elsewhere, struct GAME is only valid in C++ */
typedef struct GAME {
char location[3][3];
} GAME;
/*Function Prototypes*/
void displayboard(GAME pos);
void setblank(GAME *positionfunct); //!LOOK
/*Main Function*/
int main(void) {
/*Variable Declaration*/
GAME position;
/*Sets all of the Mark Locations to a Blank Space*/
setblank( &position ); /* Pass a pointer to the structure */
displayboard( position );
return 0;
}
void setblank(GAME *positionfunct) { //!LOOK
int a, b;
for(a=0; a<3; a++) {
for(b=0; b<3; b++) {
positionfunct->location[a][b] = '@'; //! a visible space for tests
}
}
return;
}
void displayboard(GAME pos) {
printf( "\n\t\t\t Columns" );
printf( "\n\t\t\t 1 2 3\n" );
printf( "\n\t\t\t | |" );
printf( "\n\t\t\t 1 %c | %c | %c",
pos.location[0][0], pos.location[1][0], pos.location[2][0] );
printf( "\n\t\t\t | |" );
printf( "\n\t\t\tR =================" );
printf( "\n\t\t\to | |" );
printf( "\n\t\t\tw 2 %c | %c | %c",
pos.location[0][1], pos.location[1][1], pos.location[2][1] );
printf( "\n\t\t\ts | |" );
printf( "\n\t\t\t =================" );
printf( "\n\t\t\t | |" );
printf( "\n\t\t\t 3 %c | %c | %c",
pos.location[0][2], pos.location[1][2], pos.location[2][2] );
printf( "\n\t\t\t | |\n" );
return;
}