Dipl.-Ing. Martin Weitzel, 64380 Roßdorf bei Darmstadt

CppAdv2021W49

Links zur Schulung (Beispiele/Übungen mit Online-Compiler / Infografiken)
Aufgaben und zugehörige Musterlösungen am Anfang

=== danach aktuellstes Element jeweils oben (damit man nicht immer scrollen muss) ===

https://onlinegdb.com/w2AzPk7ej

https://godbolt.org/z/Gon3Y4zdT

https://godbolt.org/z/hdTcGzjdq

https://tbfe.de/data/uploads/infographics/Example-OpenClosePrinciple.png


    [CLOBS-32...37]  ClobsObserver Exercise Step 5


    [CLOBS-27...31]  ClockObserver Exercise Step 4


    [CLOBS-20...26] ClockObserver Exercise Step 3


    [CLOBS-14...18] ClockObserver Exercise Step 2

    • Start with solution from last step
      Note that the Execute() to wrap in try-catch is in main.cpp (at the very end)
      Note that SetClock() to modify is also in main.cpp (in class Application)
      Understand that for manual testing
      • the main program will end after an exception is thrown ...
      • ... unless you wrap the whole try-catch there in a loop
    • https://onlinegdb.com/d3VzIBok4 (Solution adapted to onlineGDB)

    [CLOBS-6...12] ClockObserver Exercise Step 1

    • https://onlinegdb.com/LpgbK4Krr (onlineGDB project to start with)
    • https://onlinegdb.com/rNx9P4pIvs (Solution adapted to onlineGDB)
      Modifications made:
      • Flat file hierachie (no subdirectories)
      • no namespaces (may be added after Exerrcise step 5)
      • Application, SystemManager and Tests all in main.cpp
      • Configuration via Preprocesssor Macros now in main.cpp

    [KAPITEL-Seite] 


    [KAPITEL-Seite] 


    [DYNMM-38...50] 


    [DYNMM-38] Smart Pointer Überblick


    [DYNMM-7ff] UB bei falscher Kombination von new/delete und new[]/delete[]


    [CAST-18] 


    [EX-12] 


    [BASICS-80...87] 


    [Basics-71]


    [BASICS-36...46]  State-Machine Beispiele


    [BASICS-30...35] Ergänzung Typ-Umwandlungen


    [BASICS-31...34]


    [BASICS-26...28]


      [BASICS-22]


        [BASICS-11]


        [BASICS-10]


          [BASICS-9]


          [BASICS-8]


          [INTRO-8]


          [INTRO-5]