fork download
  1. #include <iostream>
  2. #include <memory>
  3. using namespace std;
  4.  
  5. int main() {
  6. shared_ptr<int> p{new int{10}};
  7. cout << *p << endl;
  8. return 0;
  9. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
10