Stefan Hutter / Mbed 2 deprecated Hutter_6_10_2020

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 
00002 
00003 #include "mbed.h"
00004 
00005 // Hutter_6.10.2020_ Aufgabe_1
00006 
00007 class TestKlasse{
00008     
00009   
00010     public:
00011         TestKlasse(int x, bool wahr) : _x(x), _wahr(wahr) {
00012             _x=0;
00013             _wahr=false;
00014             }
00015           
00016       int getx(void) {
00017           
00018           return _x;
00019           }
00020       
00021     private:    
00022         int _x;
00023         bool _wahr;
00024 };
00025 
00026 
00027 TestKlasse ausgabe(15,true);
00028 
00029 int main() {
00030     
00031     int y;
00032     y=ausgabe.getx();
00033     
00034     printf("bei 15 passts: %d\n",y);
00035     
00036 }
00037 
00038 
00039