[ create a new paste ] login | about

Link: http://codepad.org/QWGlZn1J    [ raw code | fork ]

C++, pasted on Feb 11:
#include <iostream>
#include <string>

using namespace std;

class Account{
public:
	void applyint() {amount+=amount*interestRate;}
	static double rate() {return interestRate;}
	//static void rate(double);

private:
	string owner;
	double amount;
	static double interestRate;
	static double initRate;
};

int main()
{
	Account ac1;
	Account *ac2=&ac1;
	
	double rate;
	rate=ac1.rate();
/*	rate=ac2->rate();
	//rate=Account::rate();*/
}


Output:
No errors or program output.


Create a new paste based on this one


Comments: