Computer Science, asked by Wahib2247, 4 months ago

how to change c++ console title in visual studio

Answers

Answered by Mister360
4

Answer:

Required Answer

Note that if you have the wrong character size you don't need to explicitly convert the string, you can just explicitly call the appropriate version of the function. In this case, you could call SetConsoleTitleA (for an ANSI string) or SetConsoleTitleW (for a Unicode string). – Harry Johnston Nov 4 '12 at 20:12

1

Technically, you should be using UNICODE and TEXT() rather than _UNICODE and _T(). The former are Win32 macros and SetConsoleTitle() is a Win32 function. The latter are C runtime macros and should only be used with C runtime functions. In practice, UNICODE and _UNICODE are usually defined together, and so TCHAR/_TCHAR and TEXT()/_T() are interchangeable. But I find it best to use the correct macros for whichever library they are being used with. On a side note, your typedefs can be simplified to just typedef std::basic_string<_TCHAR> tstring;

Answered by devanshd0007
1

Answer:

bro pls follow back pls

Similar questions