uebung2

Dependencies:   mbed

main.cpp

Committer:
rob117
Date:
2020-10-13
Revision:
2:e4ce9aad8291
Parent:
1:e07846393551

File content as of revision 2:e4ce9aad8291:

#include "mbed.h"



class MyClassA{
public:
    MyClassA(int x, bool wahr) : _x(x), _wahr(wahr)  {}
    MyClassA() : _x(), _wahr(){
        _x = 10;
    }
    
void printstatus(){
    printf("x ist: %d\n", _x);
    printf("bool ist: %d\n", _wahr);
    
}

void printstatus(int a){
    printf("x ist: %d\n", _x);
    printf("uberladene methode ist: %d\n", _x);
   
    
}
    
private:    
    int _x;
    bool _wahr;
    
};

MyClassA myclassA(5,1);
MyClassA m2;


int main()
{while(1){
    
    myclassA.printstatus();
    
    wait_ms(1000);
    m2.printstatus();
        wait_ms(1000);
    m2.printstatus(4);
   
}
}