I have a class that looks like this
//the mem_data class======================================//
class mem_data {
public:
mem_data(int,int,std::string);
~mem_data();
private:
std::vector<reader> mem_store;
int complete;
friend class model_base;
};
Now, I would like to let the class model_base access mem_store
My main code will contain the following:
mem_data test_data(20110601,10,"test_file.csv");
model_base test_model();
I basically want test_model to have access to mem_store of test_data. How can I go about writing model_base to accomplish this?
So far, I have
//the MODEL_BASE class======================================//
class model_base {
public:
model_base();
~model_base();
private:
mem_data *pass;
};
I want to somehow pass the address of test_data into this new class so that I can do something like
pass->mem_store.at(0);
Can anybody show me how to accomplish this?