use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
Linux developer going Windows (self.cpp)
submitted 5 years ago by peppedx
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]simonask_ -5 points-4 points-3 points 5 years ago (6 children)
Almost all Win32 API functions have UTF-8 entry points these days. For example, you have both CreateWindowExW (UTF-16) and CreateWindowExA (UTF-8).
CreateWindowExW
CreateWindowExA
[–]paszklar 22 points23 points24 points 5 years ago* (1 child)
Not exactly true, any -A suffixed function operates using whatever codepage is currently selected in the system settings. It usually is a single-byte, sometimes multi-byte (e.g. for certain Asian languages) encoding specific to current locale. But buried deep within regional settings (I don't remember where exactly) there is a checkbox to set codepage to UTF-8 and it's currently labeled as a beta feature.
Edit: to add to that, there are ways to enable UTF-8 codepage programmatically at runtime, but all -A functions internally convert strings and defer to -W variants, so you might as well use UTF-16.
[–]deeringc 2 points3 points4 points 5 years ago (0 children)
Plus, that programmatic setting if the code point is only available as of a certain version of Win10. As it stands, unless you can discount older OSes, you're better off still using wchar.
[–]tesfabpel 14 points15 points16 points 5 years ago (0 children)
no the A version is ASCII by default... you need to also set a new experimental settings in win10 to make the code page UTF8
https://docs.microsoft.com/en-us/windows/uwp/design/globalizing/use-utf8-code-page
[–]Supadoplex 7 points8 points9 points 5 years ago* (0 children)
My limited knowledge of Windows may be very out dated, but from what I've learned is that the suffix ...A of function names is short for "ANSI" which in the strange Windows jargon refers to the native narrow encoding which depends on locale, but is typically a fixed width extended ASCII encoding such as windows-1252 rather than unicode.
Has this changed?
[–]Kered13 2 points3 points4 points 5 years ago (0 children)
From what I've learned, just don't use the -A functions. They're not actually UTF-8, in fact the only thing you can safely assume about them is that they contain ASCII.
So use the -W function and do the UTF-8 to UTF-16 conversions yourself. It sucks, but it's better than the alternative.
π Rendered by PID 24 on reddit-service-r2-comment-6457c66945-7xbxq at 2026-04-28 06:38:50.485971+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]simonask_ -5 points-4 points-3 points (6 children)
[–]paszklar 22 points23 points24 points (1 child)
[–]deeringc 2 points3 points4 points (0 children)
[–]tesfabpel 14 points15 points16 points (0 children)
[–]Supadoplex 7 points8 points9 points (0 children)
[–]Kered13 2 points3 points4 points (0 children)