MCPcopy Create free account
hub / github.com/ShiqiYu/CPP / main

Function main

week04/examples/const-array.cpp:17–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15}
16
17int main()
18{
19 // const float PI = 3.1415926f;
20 // PI += 1.f; // error
21 // const float values[4] = {1.1f, 2.2f, 3.3f, 4.4f};
22 // values[0] = 1.0f; // error
23
24 float values[4] = {1.1f, 2.2f, 3.3f, 4.4f};
25 float sum = array_sum(values, 4);
26
27 cout << "sum = " << sum << endl;
28 return 0;
29}

Callers

nothing calls this directly

Calls 1

array_sumFunction · 0.70

Tested by

no test coverage detected