<span style="font-family:courier new,monospace">--------------<br><br>#include <iostream><br><br>int main() {<br> {<br> extern "C" { int a = 42; }<br> { std::cout << a << "\n"; } <br>
}<br> return (0);<br>}</span><br><br><span style="font-family:courier new,monospace">--------------<br><br>this code fails to compile and the compiler message alone<br><br>main.cpp:5:12: error: expected unqualified-id<br>
extern "C" { int a = 42; }<br> ^<br>1 error generated.<br><br>It's not enough to me to explain why this is not working.<br><br>There is something that I'm missing ?<br></span>