?? c38.cpp
字號(hào):
// c38.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "PR1.h"
#include "PR2.h"
#include <iostream.h>
int main(int argc, char* argv[])
{
PR1 p1;
PR2 p2;
if ( !InUse( p1, p2 ) )
cout << "Printer idle" << endl;
cout << endl;
cout << "Setting p1 to printing...\n";
p1.SetPrint(1);
if ( InUse( p1, p2 ) )
cout << "Now, printer in use.\n";
cout << endl;
cout << "Turn off p1...\n";
p1.SetPrint(0);
if ( !InUse( p1, p2 ) )
cout << "Printer idle\n";
cout << endl;
cout << "Turn on p2...\n";
p2.SetPrint(1);
if ( InUse( p1, p2 ) )
cout << "Now, printer in use.\n";
cout << endl;
return 0;
}
int InUse( PR1 o1, PR2 o2 )
{
if ( o1.printing || o2.printing )
return 1;
else
return 0;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -