Original Post
guys,
I want to read in a text file containing a 2D grid of numbers. The txt file also contains the grid size. eg.
Width 3
Height 3
1 3 6
3 5 8
9 5 2
I want to use a 2D array of char to hold this.
So how do i declare my member variable?
char** m_Grid; ??
then is it
char tile[2];
for(int i = 0; i <= Height; i++)
{
for(int i = 0; i <= m_PitchTileWidth; i++)
{
fscanf(indexfile,"%s",tile);
(WHAT GOES HERE!!? Is it m_Grid[Height] = new char(tile)
}
}
Thanks for any help, bit puzzled, been a while!