G
Gary Wessle
Hi
I created a class Info which holds variables and their values, all
public, I then created an instance of this Info in main
int main() {
Info info;
and made
class myType{
Info* info;
public:
myType::myType(Info* info) : info(info)
Type2::Type2(Info*) ...
and passed a pointer to it all over the place like
myType t1(&info);
void myType::myMethod(){
Type2 t2(info);
....
is this a safe practice.
I need the variables in Info mostly through out.
thanks
I created a class Info which holds variables and their values, all
public, I then created an instance of this Info in main
int main() {
Info info;
and made
class myType{
Info* info;
public:
myType::myType(Info* info) : info(info)
Type2::Type2(Info*) ...
and passed a pointer to it all over the place like
myType t1(&info);
void myType::myMethod(){
Type2 t2(info);
....
is this a safe practice.
I need the variables in Info mostly through out.
thanks