I'm trying to unlearn using namespace std
, considering https://www.youtube.com/watch?v=MZqjl9HEPZ8
So I tried
// using namespace std;
struct Data
{
using std::shared_ptr;
shared_ptr<char[]> m_name = nullptr;
// std::shared_ptr<char[]> m_name = nullptr;
};
And from that I got
main.cpp:14:11: Using declaration in class refers into 'std::', which is not a class
It seems I cannot do using std::shared_ptr;
inside class declaration?
Am I missing something or really need to type std::shared_ptr
there?