online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> #include <vector> #include <string> using std::vector; using std::string; using std::cout; class Point { private: int x, y; public: Point() { cout << ">> empty constructor called.\n"; } Point(int x1, int y1) { x = x1; y = y1; cout << ">> Normal constructor called.\n"; } // Copy constructor Point(const Point& p2) { x = p2.x; y = p2.y; cout << ">> Copy constructor called.\n"; } }; int main() { int n = 2; std::vector<Point> points; for (int i = 0; i < n; i++) { cout << "=== " << i << " ===\n"; points.emplace_back(1, 2); } return 0; }
  • {user}

      {timestamp}

    {content}

    #FunctionFile:Line
    VariableValue
    ExpressionValue