我有一个程序试图使用系统函数打开 firefox 浏览器:
#include <windows.h>
#include <iostream>
using namespace std;
int main()
{
system("start C:\\ProgramFiles\\MozillaFirefox\\firefox.exe\\");
return 0;
}//i had to combine the names of the directories together otherwise it would count one of them.
代码编译没有错误,但在运行时出现 Windows 错误,告诉我找不到路径。
我可以使用他们的另一个功能吗?或者在定义路径时可能使用不同的语法?