#include <string> #include <iostream> class ptr_init { public: ptr_init() : str(new std::string()) {} ~ptr_init() { delete str; } std::string *str; }; int main(int argc, const char *argv[]) { ptr_init p; std::cout << p.str << std::endl; return 0; }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 15129 | zachwhaley | Add practice directory |