summaryrefslogtreecommitdiff
path: root/2p16-2p17.cpp
blob: 8a7b8eb23726786d58054961e298c9819c751317 (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
#include <iostream>
#include "sales_item.hpp"

/*
 *
 * 2.16, 2.17
 *
 *
 */

int main () {

	int i = 0, &r1 = i;
	double d = 0, &r2 = d;

	r2 = 3.14159; // Valid
	r2 = r1; // Invalid
	i = r2; // Invalid
	r1 = d; // Invalid
	//All valid?
	std::cout << " ";
	int u = 0;
	int &ru = u;
	u = 5;
	ru = 10;
	std::cout << u << " " << ru << std::endl;
	return 0;
}