Incompatible with parameter of type “LPCWSTR”

后端 未结 5 652
终归单人心
终归单人心 2020-12-08 03:42
#include \"stdafx.h\"
#include 
#include 
#include 
#include 
using namespace std;

class Dir
{
public:
         


        
5条回答
  •  佛祖请我去吃肉
    2020-12-08 03:54

    I actually found another way to resolve this error since above method did not work for me.

    I casted all my constant character strings with (LPCWSTR). The solution looks like this
    Earlier

    MessageBox(NULL,"Dialog creation failed! Aborting..", "Error", MB_OK);
    

    After casting to LPCWSTR

    MessageBox(NULL, (LPCWSTR) "Dialog creation failed! Aborting..", (LPCWSTR) "Error", MB_OK);
    

    So just copying the (LPCWSTR) and pasting wherever this error was generated resolved all my errors.

提交回复
热议问题