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

Method setBorn

week09/examples/constructor.cpp:44–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42 name[len] = '\0';
43 }
44 void setBorn(int b)
45 {
46 if (b >= 1990 && b <= 2020 )
47 born = b;
48 else
49 std::cerr << "The input b is " << b << ", and should be in [1990, 2020]." << std::endl;
50 }
51 // the declarations, the definitions are out of the class
52 void setGender(bool isMale);
53 void printInfo();

Callers 1

mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected