mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
17 lines
246 B
C++
17 lines
246 B
C++
#include <iostream>
|
|
|
|
struct Foo {
|
|
|
|
Foo(int inX): x(inX) {
|
|
std::cout << "Ctor Foo(" << x << ")\n";
|
|
}
|
|
~Foo() {
|
|
std::cout << "Destory Foo(" << x << ")\n";
|
|
}
|
|
|
|
void print() {
|
|
std::cout << "Foo.x = " << x << '\n';
|
|
}
|
|
|
|
int x;
|
|
}; |