MCPcopy Create free account
hub / github.com/danielaparker/jsoncons / make_2_dimensional_array

Function make_2_dimensional_array

examples/src/array_examples.cpp:183–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181}
182
183void make_2_dimensional_array()
184{
185 std::cout << "2 dimensional array" <<'\n';
186 json a = json::make_array<2>(3,4,0);
187 a[0][0] = "Tenor";
188 a[0][1] = "ATM vol";
189 a[0][2] = "25-d-MS";
190 a[0][3] = "25-d-RR";
191 a[1][0] = "1Y";
192 a[1][1] = 0.20;
193 a[1][2] = 0.009;
194 a[1][3] = -0.006;
195 a[2][0] = "2Y";
196 a[2][1] = 0.18;
197 a[2][2] = 0.009;
198 a[2][3] = -0.005;
199
200 std::cout << pretty_print(a) << '\n';
201}
202
203void make_3_dimensional_array()
204{

Callers 1

mainFunction · 0.85

Calls 1

pretty_printFunction · 0.85

Tested by

no test coverage detected