I am fairly new to programming and am currently using a tutorial on how to perform ray casting. I downloaded a source file from the tutorial's web site, and some header files to go along with it. (If anyone is interested, the website is http://lodev.org/cgtutor/ ).
Every time I try to compile the .cpp file, I get a "raycaster_flat.cpp(228): error C4716: 'SDL_main' : must return a value" error. I can't figure out for the life of me what this means. Am I supposed to put a return in my .cpp or maybe in the SDL_main header?
On some platforms SDL defines main as SDL_main so that SDL can create their own main function that run code before or after your main function (which really is SDL_main). At least I think that is the reason. #define main SDL_main
This means that you have to write the return statement explicitly in main. I have never thought about this. I guess I will have to add a few return 0; in my own SDL projects.