Help

I have a constructor for a class, it needs to point to another class object, lets say in Class2. The testnode is a reference to a XML node.

Im new and trying to learn can someone provide an easy example on how you would call the constructor from another class.

Any advice would be appreciated.

 
  Class1(Test* T1, pugi::xml_node& testNode);
Simply instantiate your class.
1
2
3
4
5
 
  Test t1;
  pugi::xml_node testnode; 
...
  Class1 myclass1obj (&t1, testnode);

Your constructor will be called automatically.


Topic archived. No new replies allowed.