Scusa ma che compilatore usi? Ho provato con Visual C++ e non ci sono problemi.