daily pastebin goal
40%
SHARE
TWEET

Untitled

a guest Sep 28th, 2016 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. struct SystemEvent
  6. {
  7.     enum event
  8.     {
  9.         System = 0
  10.     };
  11. };
  12. struct WindowEvent
  13. {
  14.     enum event
  15.     {
  16.         Window = 0
  17.     };
  18. };
  19.  
  20.  
  21. template <typename T>
  22. struct Event
  23. {
  24.     unsigned int event;
  25.     T *type;
  26.     Event(unsigned int msg_,T *type_) : event(msg_),type(type_) {}
  27. };
  28.  
  29.  
  30.  
  31. int main()
  32. {
  33.     WindowEvent e;
  34.     SystemEvent f;
  35.     Event<WindowEvent> ev1(5,&e);
  36.     Event<SystemEvent> ev2(5,&f);
  37.  
  38.     return 0;
  39. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top