![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c/c++
Suspend丶
这个作者很懒,什么都没留下…
展开
-
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 阅读 · 0 评论 -
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 阅读 · 0 评论