Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

Smart Pointer C++

$
0
0

Is there a way to utilize smart pointers from C++ in code chef? I have a binary tree that utilizes smart pointers. It compiles and runs just fine on X-code, mac compiler, but when I tried to run the program on Code Chef, i get this error.

prog.cpp:24:14: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type

     std::shared_ptr<TreeNode> left;
          ^~~~~~~~~~

It's just a pointer to the left node of the tree.


Viewing all articles
Browse latest Browse all 39796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>