Nun bin ich etwas verwirrt:
Code:
15:12:21 noctem@lappi $ ./test
Normales i: 134515113
Statisches i: 0
Globales i: 0
15:12:25 noctem@lappi $ ./test
Normales i: 134515113
Statisches i: 0
Globales i: 0
15:12:26 noctem@lappi $ ./test
Normales i: 134515113
Statisches i: 0
Globales i: 0
15:12:27 noctem@lappi $ ./test
Normales i: 134515113
Statisches i: 0
Globales i: 0
15:12:27 noctem@lappi $ ./test
Normales i: 134515113
Statisches i: 0
Globales i: 0
15:12:28 noctem@lappi $ ./test
Normales i: 134515113
Statisches i: 0
Globales i: 0
<< Immer das gleiche. o.O
Code:
Code:
#include <iostream>
using namespace std;
int global_i;
int main()
{
static int static_i;
int normal_i;
cout << "Normales i: " << normal_i << endl;
cout << "Statisches i: " << static_i << endl;
cout << "Globales i: " << global_i << endl;
}