- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can someone explain what does the following c++ statement mean?
(h=h
Is this the combination of two assignments?
Thanks.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is equivalent to:
h=h;
h->heapindex=j;
The parentheses ensure that the 1st asignment occurs before the '->' operator, which operates on the return value from this 1st assignment: h (as in 'a=b=c'). The array 'h' ends up with two references to the same element (originally h) after this operation.
Simon
h=h
h->heapindex=j;
The parentheses ensure that the 1st asignment occurs before the '->' operator, which operates on the return value from this 1st assignment: h (as in 'a=b=c'). The array 'h' ends up with two references to the same element (originally h
Simon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page