online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> class Chicken{ friend std::ostream& operator<<(std::ostream& os, const Chicken &rhs); private: int i = 0; int k = 0; int s = 0; int total = 0; public: //default constructor Chicken() = default; //use constructor initializer list instead of assigning inside the body Chicken(int index, int kentucky, int sign): i(index), k(kentucky), s(sign){ //i = index; //k = kentucky; //s = sign; } Chicken operator + (Chicken obj){ Chicken Chicky;//need default constructor for this Chicky.total = i + obj.i; return Chicky; } }; std::ostream& operator<<(std::ostream& os, const Chicken &rhs) { os << rhs.i << rhs.k << rhs.s << rhs.total ; return os; } int main(){ Chicken P(1,2,3); Chicken U(2,2,2); Chicken W = P+U; std::cout << W; }

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