J
Jason
How do you access an int pointer inside a struct. This is how it seems like
it would work to me, but it doesn't...
struct maze {
int num;
int * roomnum;
};
void setmaze(struct maze * maze) {
maze->num = 1; //this is equivelant to: (*maze).num = 1
maze->(*roomnum) = 5;
}
it would work to me, but it doesn't...
struct maze {
int num;
int * roomnum;
};
void setmaze(struct maze * maze) {
maze->num = 1; //this is equivelant to: (*maze).num = 1
maze->(*roomnum) = 5;
}