summaryrefslogtreecommitdiff
path: root/2p30-2p31.cpp
blob: 9c2e781a636937732748449b1c9ea61762d8ccf4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <iostream>

/*
 *
 * 2.30, 2.31
 *
 *
 */

int main () {
	//int i;
	//const int v2 = 0; // top level ??
	//int v1 = v2;
	//int *p1 = &v1, &r1 = v1;
	//const int *p2 = &v2, *const p3 = &i, &r2 = v2; // p2 low level
	                                               // p3 top level ?? and low level??
	                                               // r2 low level ?
	//r1 = v2; low level
	//p1 = p2; low level?
	//p1 = p3; no?
	//p2 = p1; ok?
	//p2 = p3; ok?
	int v1 = 2;
	const int v2 = 0;
	int &r = v1;
	r = v2;
	std::cout << r << std::endl;
	return 0;
}