Glocke

main.cpp

Jan 8th, 2013
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.57 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. #include "LibraryWrapper.hpp"
  4. #include "Interfaces.hpp"
  5.  
  6.  
  7. class Demo: public LibraryWrapper<IDemo> {
  8.  
  9.     public:
  10.         Demo(): LibraryWrapper<IDemo>("Demo") {
  11.             std::cout << "WrappedDemo instance created" << std::endl;
  12.         }
  13.         ~Demo() {
  14.             std::cout << "WrappedDemo instance destroyed" << std::endl;
  15.         }
  16.  
  17. };
  18.  
  19.  
  20. int main() {
  21.     Demo* demo = new Demo();
  22.     Demo* another = new Demo();
  23.     demo->foo();
  24.     std::cout << "Zahl: " << demo->zahl << std::endl;
  25.     delete demo;
  26.     delete another;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment