1 /* 2 * enumvar.cpp 3 * 4 * Beispiel-Programm enum-Variable 5 * 6 * Autor: H.Drachenfels 7 * Erstellt am: 13.11.2020 8 */
9
10 #include "month.h" // htwg::month, htwg::oct, ...
11 using namespace htwg;
12
13 #include <iostream> // std::cout, std::oct, ...
14 using namespace std;
15
16 int main ()
17 {
18 month m = htwg::oct; // month eindeutig htwg::month, oct mehrdeutig
19
20 //---------------------------------------------------- print variable value
21 cout << "m = " << m << '\n'; // cout eindeutig std::cout
22
23 //-------------------------------------------------- print variable address
24 cout << "&m = " << &m << '\n';
25
26 //----------------------------------------------------- print variable size
27 cout << "sizeof m = " << sizeof m << '\n';
28 }
29