#include <iostream>using namespace std; struct C { C(string c) { this->c = c; cout << "C::C() " << c << endl; } ~C() { cout << "C::~C() " << this->c << endl; } string c;}; int main() { goto label; { C c("c"); label: ; } // your code goes here return 0;}
Standard input is empty
prog.cpp: In function 'int main()': prog.cpp:14:3: error: jump to label 'label' [-fpermissive] label: ; ^ prog.cpp:11:7: note: from here goto label; ^ prog.cpp:13:5: note: crosses initialization of 'C c' C c("c"); ^
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!