aboutsummaryrefslogtreecommitdiff
path: root/templates/std_array.cpp
blob: 8044cb208fd3d3e5f93455e9a3ac7099250d8e66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <array>
#include <iostream>

int main() {
	std::array<double, 5> a {1.0, 1.1, 1.2};
	std::cout << "Capacity of a: " << a.size() << std::endl;

	a[3] = 1.3;
	a[4] = 1.4;

	for (auto x : a)
		std::cout << x << " ";
	std::cout << std::endl;

	return 0;
}

Generated with cgit - Back to sebastiano.tronto.net