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

Method setBorn

week09/examples/function.cpp:22–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20 name[len] = '\0';
21 }
22 void setBorn(int b)
23 {
24 if (b >= 1990 && b <= 2020 )
25 born = b;
26 else
27 std::cerr << "The input b is " << b << ", and should be in [1990, 2020]." << std::endl;
28 }
29 // the declarations, the definitions are out of the class
30 void setGender(bool isMale);
31 void printInfo();

Callers 1

mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected