Hello, I can not solve the following argument errors. The code I use is the following:
string pro = "aplicacion";
HRSRC res=FindResource(NULL,pro.c_str(),RT_RCDATA);
HANDLE hFile=CreateFile("C:/Users/Usuario/Desktop/aplicacion.exe",GENERIC_WRITE,0,NULL,CREATE_ALWAYS,0,NULL);
Keep showing error:
mainwindow.cpp: 29: error: conversion from 'const char [6]' to non-scalar type 'std :: __ cxx11 :: wstring {aka std :: __ cxx11 :: basic_string} 'requested wstring exe="program";
error 2, because I must convert it to wchar_t, it is solved including the L:
in codeblocks I do not have any problem using it as a mingw compiler however with qt I use it as a visual studio compiler.