我试图通过打开文件并检查其是否打开来检查配置文件是否存在,但这不起作用。
这就是我所拥有的和错误
if (!std::ifstream{"option.config"}.is_open()) {
// create new config file
}
<source>:184:31: error: invalid use of incomplete type 'std::ifstream' {aka 'class std::basic_ifstream<char>'}
184 | if (std::ifstream{"option.config"}.is_open()) {
|
请帮助我。我不知道这意味着什么