Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //all of the code below are in the same ino file.
- class Animal{
- public:
- bool alive = false;
- Animal (bool liveStatus){
- alive = liveStatus;
- }
- }
- Animal dog(false);
- void setup(){
- dog.alive = true;
- //here when I print dog's alive flag it's true
- }
- void loop(){
- // here the alive flag of dog is still false , it should be true!!
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement