If i had to make a suggestion start with this for the 2d game aspect: http://www.kathekont...uide/index.html (note: This tutorial set was written for win32 but it DOES work in Linux, not Mac though) Its an absolutely amazing in depth guide on how to build a 2d (overhead) game engine ONLY using c++ console. No need to worry about graphics yet, get the basics first. A good C++ resource I would suggest is C++ Primer Plus by Stephen Prata its an amazing book for learning c++ with little programming knowledge.
Edit: Oh and I completely agree with DZee just write the source files in something like Notepad++ (google it) and then just compile using your terminal(or console i dont use mac) There is nothing more useful than seeing the raw compiler data when you have some kind of compile error.
Ok so after commenting out what i thought to be the problem code I still get the same issue. I now have no idea why it isnt working.
EDIT: I have uncommented the lines to get two warnings(one for each call):
1>..\main.cpp(11): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
EDIT(again): I tried using the Ctrl+F5 method and the console window still closes.
ummm ive run the program in many ways.... all of them with the same result... using any way to run it, a console window will pop up and they close out within a fraction of a second. Like i said in my post "pixel format with nececary compatabilities cannot be found." is the error i get inside the console window that opens briefly. I have concluded that i am doing something wrong with storing and printing the text to screen. just incase you guys dont want to get the source from the site, i will throw it in code tags.