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

/*
 *
 * 3.18
 *
 *
 */

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

    vector<int> ivec1;
	vector<int> ivec2(10); // We could initialize it with some elements
	vector<int> ivec3{42}; // We could initialize it with the first element being 42	
	ivec1.push_back(42); // One way we might fix it
	ivec2[0] = 42;
	cout << ivec1[0] << " " << ivec2[0] << " " << ivec3[0] << endl;
	return 0;
}