test
This commit is contained in:
parent
37776af5db
commit
ab03d5f10c
4045 changed files with 286212 additions and 3 deletions
29
.config/Code/User/History/-7e055f1a/OEK8.cpp
Normal file
29
.config/Code/User/History/-7e055f1a/OEK8.cpp
Normal file
|
@ -0,0 +1,29 @@
|
|||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class A
|
||||
{
|
||||
public:
|
||||
A(int ii = 0) : i(ii) {}
|
||||
A(const A &abc)
|
||||
{
|
||||
this->i = abc.i;
|
||||
cout << "Out Of " << i - 1 << endl;
|
||||
}
|
||||
A magic(A abc)
|
||||
{
|
||||
this->i = i + 1;
|
||||
A bcd(this->i);
|
||||
return bcd;
|
||||
}
|
||||
~A() { cout << "Out A " << i << endl; }
|
||||
|
||||
private:
|
||||
int i;
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
A b(3), a(4);
|
||||
a = b.magic(a).magic(b);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue