Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef CPP_CLASS_H__
- #define CPP_CLASS_H__
- #include <string>
- #include <iostream>
- #define _dbg(method) { std::cout << typeid(*this).name() << "::" << method << std::endl; }
- struct cppClass
- {
- explicit cppClass(std::string s): _str(s) { _dbg("cppClass(std::string)"); }
- virtual ~cppClass() { _dbg("~cppClass()"); }
- std::string str() const { return _str; }
- void set(const std::string& s) { _str = s; };
- void print() const { std::cout << "cppClass::print(): " << _str << std::endl; }
- std::string _str;
- };
- #endif // CPP_CLASS_H__
Advertisement
Add Comment
Please, Sign In to add comment