关于c++的构造函数问题
1 #include <bits/stdc++.h>
2 #include <sys/time.h>
3 #include <time.h>
4 using namespace std;
5
6 class test
7 {
8 public:
9 explicit test()
10 {
11 printf("This is test's construct\n");
12 }
13 ~test()
14 {
15 printf("This is test's destroy\n");
16 }
17 };
18
19 int main()
20 {
21 test t();
22 return 0;
23 }