summaryrefslogtreecommitdiff
path: root/7p52.cpp
blob: be826e71a1809677dcd490ef991704739bae4dac (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
#include <iostream>

/*
 *
 * 7.52
 *
 *
 */

struct Sales_data {
	std::string bookNo;
	unsigned units_sold = 0;
	double revenue = 0.0;
};

int main () {

	Sales_data item = {"978-0590353403", 25, 15.99};
	std::cout << item.bookNo << "\n"
			  << item.units_sold << "\n"
			  << item.revenue << std::endl;

	// There seems to be no issues
	// Apparently it refuses to compile if we were to use C++11
	// I am currently on C++20
	return 0;
}