Hi,
I want to output chess symbols from unicode to console in c++, please tell me how to do that.
Im using Dev c++, windows8 and console.
Im just a beginner so please keep it simple for me (also tell me the libraries to include please)
tayyabatiq
0
Newbie Poster
Recommended Answers
Jump to PostIm just a beginner so please keep it simple for me
The problem is that it's not simple. You can tell C++ to write Unicode characters until you're blue in the face, but if the console isn't set up to support Unicode or using a font that supports …
Jump to PostHow to change font to Lucida Console Unicode?
Right click on the console window and choose Properties. From there you can change the font.
If i try to just copy/paste the character (like ♔) in Dev C++, there appears '?' instead of '♔'
Yes, that's what …
Jump to PostCan you send me a sample code for doing this task?
Since you clearly didn't find the obvious code examples on the links you say you read, here:
#include <wchar.h> #include <windows.h> int main() { const wchar_t *white = L"♔♕♖♗♘♙\r\n"; const wchar_t *black = L"♚♛♜♝♞♟\r\n"; …
Jump to Post
u'9812'
(C++11 only) orL'\x9812'
. The former is preferred if supported. Some compilers also offer a unicode escape such asL'\u9812'
. For multiple characters use the string variantL"<character codes go here>"
.
All 16 Replies
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
tayyabatiq
0
Newbie Poster
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
tayyabatiq
0
Newbie Poster
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
tayyabatiq
0
Newbie Poster
tayyabatiq
0
Newbie Poster
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
tayyabatiq
0
Newbie Poster
tayyabatiq
0
Newbie Poster
NathanOliver
429
Veteran Poster
Featured Poster
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
tayyabatiq
0
Newbie Poster
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
tayyabatiq
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.