Language Selection

English French German Italian Portuguese Spanish

An Explanation of Pointers (C++)

Filed under
HowTos

Pointers are basically the same as any other variable. However, what is different about them is that instead of containing actual data, they contain a pointer to the memory location where information can be found. This is a very important concept, and many programs and ideas rely on pointers as the basis of their design, linked lists for example.

Getting Started

How do I define a pointer? Well, the same as any other variable, except you add an asterisk before its name.

So, for example, the following code creates two pointers, both of which point to an integer:

int* pNumberOne;
int* pNumberTwo;

Notice the 'p' prefix in front of the two variable names?

Full Story.

More in Tux Machines

LibreOffice 4.4.1 Released With Over 100 Fixes, Install/Update To LibreOffice 4.4.1 In Ubuntu/Linux Mint


download libreoffice 4.4.1 and upgrade in ubuntu/linux mint

LibreOffice Recently released its first release LibreOffice 4.4.1 of the LibreOffice 4.4 that was released in the last of January 2015. LibreOffice is an open source and the most popular office suit available for all major platforms.
 
 

Read at LinuxAndUbuntu