lundi 2 février 2015

What's the situation we must use a pointer in C++ [on hold]

It's a midterm in my college. I'm not coming to ask for an answer. I want to talk about it. Should we really need to use pointer, or raw pointer, nowadays?


I don't think this is a good question. Actually in modern programming, avoiding using pointer is what we prefer, I think. Even when we must use pointer, unique_ptr or shared_ptr should be considered instead of a raw pointer. I would say pointer is kind of a historically problem. They are useful and necessary in C, or old C++ program, but not in modern C++.


All right, that's just my personal opinion. And of course I'm just a freshman and I'm not as that experienced as you.


Aucun commentaire:

Enregistrer un commentaire