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)
|