When using a struct to contain a 2D char array, how do you make the size of the array? (using C) ex. typedef struct{ char board[][]; }gameBoard; So I would declare a gameBoard with: gameBoard board1; correct? This creates a board, but I don't know how I would create a size for the 2D array. I think you have to use -> to get to the 2D array inside, but don't know how to properly size it.
i think from what i know, u need to have a constant number with in the arry for example char board[100][100], something like that, just to declare the array
Are you trying to make it dynamicly sized?
http://stackoverflow.com/questions/7221981/how-to-make-a-dynamic-sized-array-in-c
In this case I would want the array to be a different size for each case I make this struct. I want to be able to give it a specific size depending on the case.
Do you know how pointers work?
|dw:1382302539500:dw|
Join our real-time social learning platform and learn together with your friends!