Fill the blanks inside class definition.
发布于 2022-03-03 11:06:30
Fill the blanks inside class definition
class Test { public: ____ int a ____ int b public: Test::Test(int _a, int _b) : a(_a) { b = _b } } int Test::b int _tmain(int argc, __TCHAR *argv[]) { Test t1(0, 0), t2(1, 1) t1.b = 10 t2.b = 20 printf(“%u %u %u %u”, t1.a, t1.b, t2.a, t2.b) }Running result: 0 20 1 20
登录后免费查看答案
关注者
0
被浏览
46