Thread Was ist das für ein Datentyp?
(2 answers)
Opened by pktm at 2008-03-09 04:14
struct reicht
[cpp] struct Tupel { int X; int Y; }; Tupel empty[]; Tupel tupel1[1] = { { 12, 15 } }; Tupel tupel2[2] = { { 12, 15 }, {13, 17} }; [/cpp] iterieren kannst du so [cpp] for(int i = 0; i < sizeof(tupel2) / sizeof(Tupel); i++) { std::cout << tupel2[i].X << ", " << tupel2[i].Y << std::endl; } [/cpp] |