#include <iostream> int main() { if (true) int x = 42; std::cout << x << '\n'; }
Standard input is empty
prog.cpp: In function ‘int main()’: prog.cpp:5:18: warning: unused variable ‘x’ [-Wunused-variable] prog.cpp:6:17: error: ‘x’ was not declared in this scope
Standard output is empty