Now that smart pointers exist, is it deprecated style to use C type pointers?

Viewed 1480

Possible Duplicate:
Which kind of pointer do I use when?

There are many pros in favour of C++11's smart pointers: They are safer, they're functionality and scope is more abvious etc.

Are the "classic" C like pointers

class C{};
C c;
C* c_p = &c;

obsolete now? Are they even deprecated? Or are there use cases where C pointers still make sense?

edit: The code snippet with a smart pointer:

class C{};
C c;
std::shared_ptr<C> c_p(new C());

edit: Thanks for pointing out the duplicate. From Xeo's answer there:

Use dumb pointers (raw pointers) or references for non-owning references to resources and when >you know that the resource will outlive the referencing object / scope. Prefer references and >use raw pointers when you need either nullability or resettability.

If that's all that there is, I accept that this question has been closed.

3 Answers
Related