summaryrefslogtreecommitdiff
path: root/3p11.cpp
blob: f2fb9cf78c3b00909b2486e43ed4331486082506 (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>
#include "sales_data.hpp"
#include "sales_item.hpp"

/*
 *
 * 3.11
 *
 * Yes, its legal. We aren't trying to do any write operations to the string.
 * The type for c is const char&
 * Also known as a reference to const char
 */

using std::string;
using std::cout;
using std::cin;
using std::cerr;
using std::clog;
using std::endl;
int main () {

	const string s = "Keep out!";
	for (auto &c : s) {
		/* ... */
		cout << c; // I put this cout here so it compiles with the flags i have enabled.
	}
	
	return 0;
}