Last change
on this file since f107afe was
1fb09ef,
checked in by Andrew Beach <ajbeach@…>, 22 months ago
|
Grouped some control flow tests together.
|
-
Property mode set to
100644
|
File size:
287 bytes
|
Rev | Line | |
---|
[1dafdfc] | 1 | forall(T &) |
---|
| 2 | struct A { |
---|
| 3 | T * next; |
---|
| 4 | }; |
---|
| 5 | |
---|
| 6 | struct B { |
---|
| 7 | A(B) link; |
---|
| 8 | }; |
---|
| 9 | |
---|
| 10 | int main(void) { |
---|
| 11 | B end = { { 0p } }; |
---|
| 12 | B two = { { &end } }; |
---|
| 13 | B one = { { &two } }; |
---|
| 14 | B * head = &one; |
---|
| 15 | |
---|
| 16 | for (B ** it = &head ; (*it)->link.next ; it = &(*it)->link.next) { |
---|
| 17 | printf("loop\n"); |
---|
| 18 | } |
---|
| 19 | printf("done\n"); |
---|
| 20 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.