C / C++ Raw Pointers Explained | Complete Tutorial for beginners

preview_player
Показать описание
In this programming tutorial we will learn what c++ pointers are, Why they are needed, how they differ from variables, their relationship with arrays, and pointer arithmetic.
C++ pointers are easy and fun to learn. Some C++ tasks are performed more easily with pointers, and other C++ tasks, such as dynamic memory allocation, cannot be performed without them.

#coding
Рекомендации по теме
Комментарии
Автор

I don't know cpp...still I didn't face any problem to understand the pointer conception from this tutorial...you made it damn easy and interesting...keep making more tutorial like this..

PujaDas-feld
Автор

Thanks for such an amazing content. Now I am feeling much comfortable in pointers

anirbanpal
Автор

This is the best video I have come across so far on pointer being a starter in C++. Just one question if you can please answer. I shall be very grateful.

How is it possible to get the memory address of the "heap" allocation stored in the static pointer variable n. If I write a simple program as below:

int *n = new int; *n=2; cout << &n; cout gives the address of n.

but I want to get the address of new int i.e., &new int. When I dereference n using cout << *n; I get garbage value as output that keeps changing. Please advise a program statement to get the memory address oof the contiguous memory block on the "heap" for both cases; if I use "new int" and if I use "malloc".

Thanks and Kind Regards

syedimadhaqqi
visit shbcf.ru