Systemnahe Programmierung in C: Initialisierung von Strukturen |
1struct complex
2{
3 double re;
4 double im;
5};
6
7struct complex c1 = { 1.0, 1.0 };
8struct complex c2 = { 0.0, 0.0 };
9
10struct datum
11{
12 unsigned char tag;
13 unsigned char monat;
14 unsigned int jahr;
15};
16
17struct person
18{
19 char name[20];
20 char vorname[10];
21 struct datum geb;
22};
23
24struct person egon =
25 { "Lembke",
26 "Robert",
27 {29, 2, 1905}
28 };
|
Letzte Änderung: 11.01.2007 | © Prof. Dr. Uwe Schmidt |