online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include<map> #include<string> #include<vector> class DateOfBirth { private: int month = 0, day = 0, year = 0; public: //getters int getMonth() const { return month; } int getDay() const { return day ; } int getYear() const { return year; } //setters void setMonth(int pmonth) { month = pmonth; } void setDay(int pday) { day = pday ; } void setYear(int pyear) { year = pyear; } }; class AnotherClas { DateOfBirth d; public: //getter DateOfBirth getDateOfBirth() const { return d; } //setter void setDateOfBirth(int pmonth, int pday, int pyear) { d.setMonth(pmonth); //set month d.setDay(pday); //set day d.setYear(pyear); //set year } }; int main() { //create instance of another class AnotherClas a; a.setDateOfBirth(10, 2, 3); //lets confirm by printing std::cout << a.getDateOfBirth().getMonth() << "-" << a.getDateOfBirth().getDay() << "-" << a.getDateOfBirth().getYear() <<std::endl; return 0; }

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