Answer the question
In order to leave comments, you need to log in
How to read from console LPCWSTR?
There is a task:
Enter the directory in the console. Print the names of all txt files in the .
Answer the question
In order to leave comments, you need to log in
If on pure WinAPI, then you must first get the console encoding (GetConsoleCP) (in Russian Windows it is usually 866 or 1251), read the string into a regular PSTR, and then convert it to PWSTR using WideCharToMultiByte. The console encoding is needed to pass it to WideCharToMultiByte.
wcin does it all by itself.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question