Jump to content
  • Advertisement
Sign in to follow this  
Rannion

C++ Filling console with ASCII

This topic is 389 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!