online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> using namespace std; struct FirstFloor { FirstFloor() { this->Where(); } // 不好:基类构造调用了虚函数 virtual void Where() { cout << "您的位置是:一楼\n"; } }; struct SecondFloor: FirstFloor { string place; explicit SecondFloor(string place) : place(place) {} void Where() override { cout << "您的位置是:二楼的" << place << "\n"; } }; int main() { SecondFloor sf("男厕所"); }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue