error: ‘unique_ptr’ is not a member of ‘std’
So here what I learned in 2020 - memory.h is at /usr/include AND in /usr/include/c++/4.8.5 and you need the second to be found before the first. In Eclipse set the order using Project->Properties->Path and Symbols->Includes->Add... path if needed and set first
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
// ^