资 源 简 介
有一个打印机被不同类型的用户共享,当某个用户使用其时,必须先检测其它用户是否在使用,假设函数inuse()当有用户使用打印机时返回1,当没有用户使用时返回0。把函数inuse()作为不同类的友元函数,请设计。-a printer by different types of users to share, when a user to use their time and must first detect whether other users in the use of the assumption that inuse function () when users return to a printer. When users do not use return 0. Inuse put function (), as different types of Friends yuan function, design.