Why does that work?
#include
using namespace std;
int main() {
float* tab[3];
int i = 0;
while(i < 3) {
tab[i] = ne
Use of unallocated memory results in undefined behaviour. You can have no expectations of what will happen when you do this even on the same system and compiler, let alone across different combinations of hardware and compiler.
The program might crash immediately, it might work for a while and then fail later, it might even appear to work perfectly.
Accessing memory you don't own is always a programming error, though. Don't think of the appearance of correct operation as "it sometimes works", think of it as "I got really unlucky and my bug does not show up quickly".