Code:
con = fopen("CON", "w");
if (!con) {
printf("Cannot open CON\n");
}
That bit of code (after SDL_init()) causes Cannot open CON to be printed to stdout.txt ratrher than pointing a valid pointer to CON (DOS console, which I want). Even redirecting:
Code:
freopen( "CON", "w", stdout );
freopen( "CON", "w", stderr );
doesn't fix the problem as stdout and stderr now don't work at all.
(Note: SDL_init() redirects stdout and stderr to txt files). I've even tried using cout to find that it has the same problem.
I'm using borland 5.5, SDL 1.2 and windows XP SP2.