Skip to content

Latest commit

 

History

History
21 lines (17 loc) · 282 Bytes

036.md

File metadata and controls

21 lines (17 loc) · 282 Bytes
//difficulty level: hard

#include <iostream>
#include <array>

struct Nec {
	Nec() { std::cout << 1; }
	~Nec() { std::cout << 2; }
	Nec(const Nec&) { std::cout << 3; }
	void f() { std::cout << 4; }
};

int main()
{
	std::array<Nec, 2> ar;

	for (auto n : ar)
		n.f();
}