C++ |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
| class Some {
public:
Some(int n) {
cout << "Construct: " << this << endl;
size = n;
data = new int[size];
}
~Some() {
cout << "Destruct: " << this << endl;
delete []data;
}
private:
int *data;
int size;
};
int main() {
Some arr(50);
return 0;
} |
|
Если честно не совсем понял суть вопроса...