C++ pointers on example
- by terence6
I have a sample code :
#include <iostream>
#include <conio.h>
using namespace std;
int main ()
{
int firstvalue = 5, secondvalue = 15;
int * p1, * p2;
p1 = &firstvalue;
p2 = &secondvalue;
cout << "1.p1: " << p1 << ", p2: " << p2 << endl;
cout << "1.*p1: " << *p1…