Category Archives: C++

Inheritance in C++

// base.h class base { public: void f1();           // f1 cannot be overwritten virtual void f2();      // f2 can be overwritten virtual void f3() = 0;  // f3 is a pure virtual function and // must be overwritten … Continue reading

Posted in C++ | Leave a comment

The world of C++

[PDF Copy] Defining and using a class Header: // A.h #ifndef A_HEADER #define A_HEADER class A { public: // Exposed member functions or Methods void foo1(); // Declaration // Inlined function: foo2 void foo2() { … } private: // Private … Continue reading

Posted in C++ | Leave a comment

Pointers and Arrays

Pointers to values // value (of type int) stored in a memory location int value;     // avalue: pointer to a value of type int // avalue: address of a memory location containing a value of type int int* avalue;     … Continue reading

Posted in C++ | Leave a comment