Jump to content
  • Advertisement
Sign in to follow this  
Rannion

C++ Filling console with ASCII

Recommended Posts

Hi,

I'm trying to fill a win64 Console with ASCII char.

At the moment I have 2 solutions: one using std::cout for each line, let's say 30 lines at once using std::endl at the end of each one.

The second solution is using FillConsoleOutputCharacter. This method seems a lot more robust and with less flickering. But I'm guessing, internally it's using a different table than the one used by std::cout. I'm trying to fill the console with the unsigned char 0xB0 which is a sort of grey square when I use std::cout but when using FillConsoleOutputCharacter it is outputted as the UTF8 char '°'.

I tried using SetConsoleOutputCP before but could not find a proper way to force it to only use the non-extended ASCII code page...

Has anyone a hint on this one?

Cheers!

Share this post


Link to post
Share on other sites
Advertisement

Well, this really depends on which function youre using.. if you use "FillConsoleOutputCharacter" or "FillConsoleOutputCharacterW" it would allow the degree character .. using "FillConsoleOutputCharacterA" should use the same set of character that cout is using .. so that should cause it to fill it with the square

Share this post


Link to post
Share on other sites

there shouldn't be any flickering with FillConsoleOutput, check that your'e dimensions are right. I recently was doing work with this and the dimension variable i was querying had a height of like 900, which caused mad flicker. The dimension struct has a couple different dimension members, get the right one and do +1 i think. 

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  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!