TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: JAVIER KOHEN
from: VADIM DAVYDOFF
date: 1997-07-04 01:04:00
subject: Classes [2/2]

Hello Javier!
13 Jun 97 21:21, Javier Kohen wrote to All:
 JK> int main()
 JK> {
 JK>     Mouse mouse(False);
 JK>     int buttons;
 JK>     cout << "Probando \"Hard\" reset...\n";
 JK>     mouse.reset(Mouse::Hard);
 JK>     buttons = mouse.getButtons();
 JK>     if (buttons != -1) {
 JK>         cout << "El mouse est  activo.\n";
 JK>         cout << "Tiene: " << buttons << " botones.\n";
 JK>     } else {
 JK>         cout << "El mouse no est  activo.\n";
 JK>     }
It seems to me, You ought to make a Mouse::getButtons () inline and put it 
call just into the 'if' and 'cout' statements. And in that case You do not 
need 'buttons' variable. And make a Mouse::setButtons () inline too.
Vadim
--- GoldED 2.41+
---------------
* Origin: ---- * BackSpace * St.Petersburg * Russia * ---- (2:5030/122.72)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.