c++ 错误告诉我即使我输入了正确的路径也找不到C盘,这是语法吗? [关闭]

问题描述 投票:0回答:0

我有一个程序试图使用系统函数打开 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 错误,告诉我找不到路径。

我可以使用他们的另一个功能吗?或者在定义路径时可能使用不同的语法?

c++ dev-c++
© www.soinside.com 2019 - 2024. All rights reserved.