1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#include "another.hpp" #include <iostream> namespace { struct Test { Test() { std::cout << "main.cpp: Test::Test()\n"; } int x = 1; }; } int main() { Test test; std::cout << test.x << '\n'; another(); return 0; }