Skip to content

Frequently Asked Questions

PardCode edited this page Jun 27, 2021 · 12 revisions

Frequently Asked Questions

Table of Contents

Introduction

In this document you can find the questions made frequently in the comments section of the various Youtube Video Tutorials and in the #questions and #ideas-and-suggestions Discord Channels of C++ 3D Game Tutorial Series

FAQ

How to solve the error: a value of type const char* cannot be assigned to an entity of type LPCWSTR?

To solve this kind of error you've to put L in front of your strings, like "My Window Class" --> L"My Window Class". LPCWSTR is the same of wchar_t*, that is a pointer to a string of UNICODE characters, and so, to use UNICODE strings, you have to append L at the begin of the string. This because probably UNICODE character set is settled in the project properties. If you want to set your favourite character set, in Visual Studio go to Project, Properties, and in Common Properties/General under the tab Project Defaults there is a property called Character Set, here you can choose your favourite one. However UNICODE character set is recommended.