#include <iostream>
int main(int argc, char *argv[])
{
int var1 = 5;
int *pointer = &var1;
int var2 = *pointer;
std::cout << "var1 = " << var1 << "\n";
std::cout << "pointer = " << pointer << "\n";
std::cout << "*pointer = " << *pointer << "\n";
std::cout << "var2 = " << var2 << "\n";
std::cout << "\n";
}
Monday, April 18, 2011
C/C++ pointer exercise: Pointer Dereferencing
Labels
Dev. tools
(13)
how to
(10)
Internet of Things (IoT)
(1)
learn Qt
(1)
misc
(1)
misc.
(1)
mobile
(2)
news
(6)
OpenCV
(1)
OpenGL
(1)
QML
(1)
qml example
(40)
Qt
(2)
Qt Cloud
(1)
Qt Creator
(3)
Qt Creator Examples
(4)
Qt Enterprise Embedded
(1)
Qt Examples
(1)
Qt for Android
(5)
Qt for iOS
(2)
Qt for MCU
(1)
Qt news
(1)
Qt Quick
(3)
Qt Quick Control
(1)
Qt Quick Designer
(2)
QtQuick example
(14)
QtQuick.Controls examples
(13)
Ubuntu SDK
(1)
VirtualBox
(1)
WebEngine
(1)