fork download
  1. #include <iostream>
  2. #include <memory>
  3.  
  4. int main() {
  5. auto str = std::make_unique<std::string>("Testando Smart Pointers");
  6. std::cout << *str.get() << " size: " << str->size() << std::endl;
  7. }
  8.  
  9. //https://pt.stackoverflow.com/q/260076/101
Success #stdin #stdout 0s 4532KB
stdin
Standard input is empty
stdout
Testando Smart Pointers size: 23