(C++) address

August 30, 2019 · View on GitHub

An address is location in a a computer's memory where it stores all its variables.


#include <iostream> int main() {   const int i = 10;   std::cout << i  << '\n'; //Request the value of i   std::cout << &i << '\n'; //Request the address of i }

Screen output:

10 0xbfbcea2c

A pointer is a data type for addresses.