Created
August 3, 2017 19:09
-
-
Save modocache/e0804e1b1cc19deb16ce3ba6d79d304a to your computer and use it in GitHub Desktop.
This file contains 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
#define NEW_MY_INT_CLASS(num) MyClass<int>(num); | |
int gX = 10; | |
template <class T> | |
class MyClass { | |
private: | |
T Member; | |
public: | |
MyClass(T Member): Member(Member) {} | |
T getMember() { return Member; } | |
}; | |
int main() { | |
MyClass<int> MC = NEW_MY_INT_CLASS(1); | |
return MC.getMember(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment