kvr_audio_plugin_news_468x60
Pointer in C++ | PROGRAMMING LANGUAGES | PLUGIN TUTOR

Pointer in C++

Pointer is a variable that stores a memory address. The memory address is a unique location and has its own unique address.

Normally, variables hold integer or string values such as 15 or “welcome” and these values are stored under specific location within computer memory. But the pointer holds the memory address with pointing to these values.

The identifier of pointer is an asterisk (*), which acts as dereference operator and that can be literally translated to “value pointed by”.

int * mypointer;

cout << "Pointer's memory address:" << &mypointer << endl;

Output : Pointer's memory address: 0x23ff74

int myinteger=15;
mypointer = &myintger;

cout << "Now Pointer's pointing to:" << *mypointer << endl;

Output : Now Pointer's pointing to:              15


Leave a Reply

Spam Protection by WP-SpamFree