c++中使用类名()创建临时对象 eg: class A{ public: void print(); }; int main(void) { A().print(); //创建临时对象调用相关函数 return 0; }