0

I am trying to make a 2048 game in C++ using the Win32 Console. Is it possible to include the box symbol ─ in the console? If not, is there any replacement for that symbol other than the normal dash and underscore? I am coding on Windows 10 in Visual Studio 2015. Thanks!

mendel3
  • 29
  • 5

1 Answers1

0

You could try Box Drawing with Unicode. https://en.wikipedia.org/wiki/Box-drawing_character

Basically, you use box drawing characters to create the containers you want and fill them in. Then you overwrite the numbers, leaving the boxes in place.

Console manipulation is tricky, so be prepared for some frustration, but you can do what you're attempting.

OneHoopyFrood
  • 3,829
  • 3
  • 24
  • 39
  • Thank you, can I just copy and paste one of these characters into my code? – mendel3 Jul 27 '17 at 17:31
  • Check this question out and the answers to it. It should help. https://stackoverflow.com/q/2849010/1795429 – OneHoopyFrood Jul 27 '17 at 17:34
  • @mendel3 [Yes](http://en.cppreference.com/w/cpp/language/string_literal). There is no text but encoded text. Your source file has an encoding ['source charset"] (you are telling your compiler what that is), your compiler output has an encoding ["execution charset"] (you are telling your compiler what to convert to), your console has an encoding ["codepage"] (go `chcp`), your program's runtime library might sense what it is and convert to/from it and the runtime might also be influenced by locale functions that your program calls and environment variables. Then comes the font… – Tom Blodget Jul 28 '17 at 02:46