Thread
:
help with structs and pointers in C++
View Single Post
Chong
Go4Expert Member
1Jun2011,16:05
Hi
try the following:
+++++++++++++++++++++
struct dir {
char name[100];
int root_dir;
:
};
struct fat {
struct dir*dir_away;
};
main()
{
fat *pFat = new struct fat[1];
pFat->dir_array = new struct dir[1];
pFat->dir_array->root_dir = 1;
}