You need to include header where unique_ptr
and shared_ptr
are defined
#include <memory>
As you already knew that you need to compile with c++11
flag
g++ main.cpp -o run -std=c++11
// ^
You need to include header where unique_ptr
and shared_ptr
are defined
#include <memory>
As you already knew that you need to compile with c++11
flag
g++ main.cpp -o run -std=c++11
// ^