- 博客(2)
- 收藏
- 关注
原创 c++笔试题
问:下面程序执行结果如何?#include<iostream>#include<cstring>using namespace std;class Dummy{public: Dummy(const char* str) :m_str(str),m_len(m_str.size()){} size_t m_len; string m_str;};int main(){ Dummy d("hello"); cout << d.m_str &l
2021-11-23 17:03:58
422
原创 c++笔试题
问:下面程序总共调用了几次构造函数?#include <iostream>using namespace std;class A{public: A(void){ cout << "A的无参构造" << endl; } A(const A& that){ cout << "A的拷贝构造" << endl; }};void func1(A a){}A func
2021-11-23 10:41:22
378
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人