25% developed

Intro To C++/Pointing to Data

From Wikibooks, open books for an open world
Jump to navigation Jump to search
Intro To C++
Reading & Writing Files Pointing to Data C++,Peeking Advanced topics

What is a pointer?

[edit | edit source]

A Pointer is a variable that contains a memory address of other variable. Pointer variable can be declared like the other variable. But, the data type is suffixed by a "*" character.

#include <iostream>;
using namespace std;

int main{

 return 0;
}

Playing with pointer

[edit | edit source]

Reference,an object in a program

[edit | edit source]

Pointer & Reference

[edit | edit source]
#include <iostream>;
using namespace std;

int main{

 return 0;
}