Created
May 18, 2014 07:29
-
-
Save srikiraju/a19694634607141079e3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//blah.hpp | |
class Base { | |
public: | |
virtual void coolShit() = 0; | |
}; | |
class Derived : public Base { | |
public: | |
void coolShit(); | |
}; | |
extern Base* basePtr; | |
//blah.cpp | |
#include "vcalls.hpp" | |
#include <iostream> | |
Base* basePtr = new Derived(); | |
void Derived::coolShit() { | |
std::cout << "Derived coolShit"; | |
}; | |
int main(int argc, char** argv) { | |
basePtr->coolShit(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment