[ create a new paste ] login | about

Link: http://codepad.org/xRJZPgyo    [ raw code | output | fork ]

C++, pasted on Mar 11:
1
2
3
4
5
6
7
8
9
10
union x {
  int t;
  int k() { return 42;};
};

int main() {
  x y;
  y.t = y.k();
  std::cout << y.t << std::endl;
}


Output:
1
42


Create a new paste based on this one


Comments: