Sign in to follow this  

Setting screen resolution in console

Recommended Posts


I have been trying to create a terminal console game, and have found a simple way to change the console fontsize and set the resolution according to it. I played around with some code from the internet, and accidently saved over my working code, and now I can't seem to find the errors (from my newly rewritten code).

Link to pastebin:

I'm getting all kinds of erronymous numbers when I test my implementation of set: and get_scr_x&y and get; and set_font_width/height, and my screen resolution changes, but also floods the OP in an infinite loop. 

Anybody see the error and can comment on how to fix it?

Share this post

Link to post
Share on other sites

I love how c++ is fast since it doesnt typecheck, but still people argue you should check for types =P

Say what?

C++ is statically typed. The typechecking is done by the compiler, which is *why* it has zero bearing on the speed of the final program. You can still invoke type checks dynamically (e.g. dynamic_cast/RTTI/etc.) but that's on the programmer, not the language.

Also, I suggested the OP should check return values which are not the same thing as types.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this