forked from grantrostig/cpp_by_example
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmain.cpp
More file actions
22 lines (19 loc) · 348 Bytes
/
main.cpp
File metadata and controls
22 lines (19 loc) · 348 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <iostream>
#include <array>
using namespace std;
struct S {
string str;
int i;
};
std::array<S, 4> s1{{
{"abc",1},
{"def",2}
}};
std::array<unsigned char, 20> a1 {0,1,2};
int main() {
std::array<unsigned char, 20> a2 {0,1,2};
for (auto & j: s1) {
cout << j.str << "," << endl;
}
return 0;
}