T
tradevol
Hi,
Here is what I want to do.
I have class A contains class B.
class A{
public:
B b;
map<string, float> myData;
}
class B{
B(map* data){
bData = data;
}
map<string,float>* bData;
void myFunction(){ //get data from *bData
map<string,float> temp = *bData;
}
}
my purpose is to have data udpated continuously on class A on map
myData, since its pointer is passed to B. B can call myFunction and be
sure it is using the most current data from myData after find call.
new to C++, made a mess in the codes. It seems I cannot even assign
temp after deference bData.
Any suggestions?
Thanks
Chris
Here is what I want to do.
I have class A contains class B.
class A{
public:
B b;
map<string, float> myData;
}
class B{
B(map* data){
bData = data;
}
map<string,float>* bData;
void myFunction(){ //get data from *bData
map<string,float> temp = *bData;
}
}
my purpose is to have data udpated continuously on class A on map
myData, since its pointer is passed to B. B can call myFunction and be
sure it is using the most current data from myData after find call.
new to C++, made a mess in the codes. It seems I cannot even assign
temp after deference bData.
Any suggestions?
Thanks
Chris