Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 573157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:41:40+00:00 2026-05-13T13:41:40+00:00

How I print these UTF-8 characters in C++?

  • 0

How I print these UTF-8 characters in C++?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T13:41:40+00:00Added an answer on May 13, 2026 at 1:41 pm

    Well, you know it is possible because your browser could render them. On Windows you can use the charmap.exe applet to discover their Unicode code points:

    • ♠ = 0x2660
    • ♣ = 0x2663
    • ♥ = 0x2665
    • ♦ = 0x2666

    The challenge is to get a C/C++ program to display them. That’s not going to be possible in any kind of non-platform specific way unless you use a cross-platform UI library like Qt or wxWidgets. In a Windows GUI program you can do it like this in the WM_PAINT message handler:

      case WM_PAINT: {
          hdc = BeginPaint(hWnd, &ps);
          HFONT hFont = CreateFont(16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, L"Arial Unicode MS");
          HGDIOBJ oldFont = SelectObject(hdc, hFont);
          RECT rc = {0, 0, 666, 16};
          DrawTextEx(hdc, L"\x2660\x2663\x2665\x2666", -1, &rc, DT_LEFT, 0);
          SelectObject(hdc, oldFont);
          DeleteObject(hFont);
          EndPaint(hWnd, &ps);
        }
        break;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I print to the standard output some characters from a wide UTF-8 range in
I want these two print functions to do the same thing: unsigned int Arraye[]
Suppose you have these modules: module1.py import module2 def a(): module1.b() def c(): print
There are many ways to represent the +1 million UTF-8 characters . Take the
I am trying to decode some UTF-8 strings in Java. These strings contain some
EDIT: The following print shows my intended value. (both sys.stdout.encoding and sys.stdin.encoding are 'UTF-8').
I have a simple form where I can type some characters. These characters are
I have these lines in my actionCreate : if (isset($_POST['DpcioCbn'])) { print_r($_POST['DpcioCbn']); $model->attributes =
I am trying to print 1 if there are at least two of the
Is there any way that we can print the user name of the person

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.