A
Ace Alexander
I searched the internet and this news group and am still having
problems grasping this concept. I have:
struct file
{
bool open;
vector<file*>my_files;
};
I initialize a file:
file main_file;
I also set all the pointers of my_files, and the pointers of those
my_files in main_file.
I then create an array which I want to use a deep copy of main_file.
Ex: file_arr[0]=main_file;
What is throwing me off is the file* vector my_files. How do I do a
deep copy of the struct file so that it also deep copies the file*
array?
Thank you,
Ace Alexander
problems grasping this concept. I have:
struct file
{
bool open;
vector<file*>my_files;
};
I initialize a file:
file main_file;
I also set all the pointers of my_files, and the pointers of those
my_files in main_file.
I then create an array which I want to use a deep copy of main_file.
Ex: file_arr[0]=main_file;
What is throwing me off is the file* vector my_files. How do I do a
deep copy of the struct file so that it also deep copies the file*
array?
Thank you,
Ace Alexander