下列程序的运行结果是1*2 3*4,请将横线处缺失程序补充完整...
发布于 2022-03-03 16:13:40
下列程序的运行结果是 1*2 3*4,那么横线处缺失程序可以是()
#include <iostream> using namespace std class Test{ public: Test(int a, int b) { x = a y = b } ~Test() {} void print() { cout << x << "*" << y << " " } private: int x int y } int main() { Test t[2] = {_______} for(int i = 0 i < 2 i++) t[i].print() return 0 }
登录后免费查看答案
关注者
0
被浏览
35