[ create a new paste ] login | about

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

C++, pasted on Oct 18:
1
2
3
4
5
6
7
8
9
10
11
12
#include <iostream>

struct podclass {
  int i;
};

int main() {
  podclass* p = new podclass;   // keine Initialisierung
  podclass* q = new podclass(); // "Wert-Initialisierung"
  std::cout << p->i << '\n'; // #1
  std::cout << q->i << '\n'; // #2
}


Output:
1
2
-1819044973
0


Create a new paste based on this one


Comments: