Hi all,
I have started sdl and have sucesfully done some basic graphics which correctly handle collisions ......I am starting a new basic program and when sdl is initialised depending on the outcome i want to use printf and it says "SDL init succesful" or sdl init failed .......the code I have so far is below and none of the printf statements display in visual studio 6
Code:
#include "SDL/SDL.h"
#include <string>
#include <stdio.h>
#include "SDL/SDL_image.h"
//set global vars for screen width height and bts per pixel they are constants
const int SCREEN_WIDTH = 640;
const int SCREEN_HEIGHT = 480;
const int SCREEN_BPP = 32;
//set dot attribs
const int dot_h = 20;
const int dot_w = 20;
//set global surfaces
SDL_Surface *dot = NULL;
SDL_Surface *screen = NULL;
//int SDL_Init(Uint32 flags);
bool startsdl()
{
//init sdl and check if started ok if not retuen false
if(SDL_Init(SDL_INIT_EVERYTHING) == -1)
{
return false;
}
return true;
}
int main(int argc, char *args[])
{
//quit prog status
bool quit = false;
//init sdl
if(startsdl() == false)
{
printf("sdl int failed \n");
}
printf("sdl int worked \n");
return 0;
}
edit ----->
just realised the utput is going to stdout.txt how can I get the output to show in the visual c++ 6 small window at the bottom
thanks
david