Is there is any special meaning for raw pointer?
Is normal pointer variable and raw pointer are same?
Is there is any special meaning for raw pointer?
Is normal pointer variable and raw pointer are same?
The raw pointers are exactly the same with normal pointers, they can be written like this:
type * pointer_name = & variable_name;
Since C++11, we have some special pointers, called "smart pointers". They are called "smart" because they know when they have to delete the used memory. They do it when nothing else in your program uses that block of memory. There are 3 types of smart pointers in C++11:
unique_ptr<typename> pointer_name;
weak_ptr<typename> pointer_name;
shared_ptr<typename> pointer_name;
You can read more about using these types of pointers here.
Depend on what you are qualifying a "normal" pointer, a raw pointer is written like this:
int* rawptr;
With c++11, I would suggest to avoid it whenever its possible. Use std::unique_ptr instead.