I'm using C++, compiled using Microsoft Visual C++ .NET (2003), under Windows XP. I use statements like
std::cout << "Got to here" << std::endl;
to debug the program. I've got
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
at the start of the program. I run the program using a batch file which redirects the output to a file. All works fine.
Now I take the .exe program and run it on another machine under Windows Vista. When I run it, the output to std::cout fails to appear. Why is that?
In case it's relevant, the Vista machine has installed Microsoft Visual C++ Toolkit 2003; Microsoft Visual C++ 2005 Express Edition; Microsoft Visual C++ 2008 redistributable; Microsoft Visual C++ 2010 x86 redistributable.
The program is actually a Delphi Pascal program calling C++ functions. The Pascal bit also produces output. In XP, the Pascal and C++ output are interleaved. In Vista, I only get the Pascal output.
Thanks for any hints.