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

Function main

week07/examples/function-reference.cpp:9–13  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7float (&norm_ref)(float x, float y) = norm_l1; //norm_ref is a function reference
8
9int main()
10{
11 cout << "L1 norm of (-3, 4) = " << norm_ref(-3, 4) << endl;
12 return 0;
13}
14
15float norm_l1(float x, float y)
16{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected