Nel tuo programma hai definito un main?
Amaro C++, il gusto pieno dell'undefined behavior.
Regole del Forum