Skip to content

Instantly share code, notes, and snippets.

@bergmark
Created January 26, 2011 00:49
Show Gist options
  • Select an option

  • Save bergmark/796022 to your computer and use it in GitHub Desktop.

Select an option

Save bergmark/796022 to your computer and use it in GitHub Desktop.
#include <iostream>
struct Node {
int val;
struct Node *next;
};
int main() {
Node n;
n.val = 100;
n.next = &n;
Node m = { 200, &n };
std::cout << m.next << std::endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment