我有以下代码:
#include <windows.h>
void statistics(){
//processing code
LPCTSTR helpFile = "report.html";
ShellExecute(NULL, "open", helpFile, NULL, NULL, SW_SHOWNORMAL);
system("PAUSE");
}如果我把这些代码行放在'main‘函数中,它就能工作,但这里会写一个错误:"Error: a value of type"const char*“不能用来初始化一个类型为"LPCTSTR”的实体。你知道为什么吗?
发布于 2015-11-28 19:01:33
使用带有这些参数的ShellExecuteA (用于char的用法)。这应该行得通。
https://stackoverflow.com/questions/33970024
复制相似问题