Advertisement
RuiViana

Ponteiro

Feb 12th, 2020
500
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. bool ligado = false;
  2. //------------------------------------------------------
  3. void acione(bool *luz)
  4. {
  5.   *luz = !*luz;
  6. }
  7. //------------------------------------------------------
  8. void setup()
  9. {
  10.     acione(&ligado);
  11.     Serial.print(ligado);   // <== aqui ela teria de mostrar true, mas não sei como
  12.                                           //  mudar o valor implicitamente na função acione
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement