online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include<map> #include<string> #include<vector> #include <ostream> #include <string> #include <ostream> class account { private: int acct_ID; std::string acct_name; float acct_balance; static int next_id; public: account(); account(account& rhs); ~account(); account(int acct_ID, std::string acct_name, float acct_balance); void set_ID(int acct_ID); int get_ID()const; void set_name(std::string acct_name); void input(); void set_balance(float acct_balance); std::ostream& display(std::ostream& stream); }; account::account(): acct_ID{0},acct_name{0},acct_balance{ 0 }{} account::account(account& rhs): acct_ID{ rhs.acct_ID }, acct_name{ rhs.acct_name }, acct_balance{ rhs.acct_balance }{} account::account(int ID, std::string name, float balance) :acct_ID{ ID }, acct_name{ name }, acct_balance{ balance } { } int account::next_id = 0; account::~account() {} void account::set_ID(int ID) { acct_ID = ID; } int account::get_ID()const { int acct_ID = 0; return acct_ID; } void account::set_name(std::string name) { acct_name = name; } void account::input() { std::cout << "Enter the name: "; std::cin >> acct_name; float x; std::cout << "Enter the balance: "; std::cin >> x; acct_balance += x; acct_ID = next_id; next_id++; } //!!!!!!!!!!!!!!!!!!!!!!! std::ostream& account::display(std::ostream& stream) { stream << "Account name: " << this->acct_name; stream << "Account balance: " << this->acct_balance; stream << "Account ID: " << this->acct_ID; return stream; } std::ostream& operator<<(std::ostream& stream,account& Account) { return Account.display(stream); } void account::set_balance(float balance) { acct_balance = balance; } int main() { 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