#include <iostream> class Hello { public: void Test() { std::cout << "Testing" << std::endl; } }; class Hi { public: Hi() :hello(new Hello()) {} ~Hi() { delete hello; } void Testing() const { hello->Test(); } private: Hello * hello; }; int main(int argc, char ** argv) { Hi hi; ; hi.Testing(); return 0; }
Hi
hello = NULL;
hello
Hello const * hello;
Test
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)