void test_friend_3_function()
{
	C1 x;
	C2 y;
	x.set_status(IDLE);
	y.set_status(IDLE);
	if (x.idle(y)) cout << "Screen can be used.\n";
	else cout << "In use.\n";
	x.set_status(INUSE);
	if (x.idle(y)) cout << "Screen can be used.\n";
	else cout << "In use.\n";
}
Exemplo n.º 2
0
int main()
{
clrscr();
C1 x;
C2 y;
x.set_status(IDLE);
y.set_status(IDLE);
if(idle(x, y)) cout << "Screen can be used.\n";
else cout << "In use.\n";
x.set_status(INUSE);
if(idle(x, y)) cout << "Screen can be used.\n";
else cout << "In use.\n";
getch();
return 0;
}