[ create a new paste ] login | about

Link: http://codepad.org/9NDlxxyU    [ raw code | output | fork ]

C++, pasted on Oct 27:
#include <iostream>
using namespace std;

enum Status{Idle, Busy};
class text
{
public:
	void SetStatus(Status s);
	Status getStatus();
private:
	Status s;		
};
void text::SetStatus(Status s)
{
	this->s = s;
}
Status text::getStatus()
{
	return this->s;
}

int main()
{
	text myText;
	myText.SetStatus(Busy);
	cout << myText.getStatus() << endl;
}


Output:
1
1


Create a new paste based on this one


Comments: