Gcc 如何修复我的代码块编译程序使用fstream,无法打开20 MB大的文件? #包括 #包括 #包括 使用名称空间std; int main(){ char fileInputPath[256]=“D:\25mb.file”; ifstream fileIn

Gcc 如何修复我的代码块编译程序使用fstream,无法打开20 MB大的文件? #包括 #包括 #包括 使用名称空间std; int main(){ char fileInputPath[256]=“D:\25mb.file”; ifstream fileIn,gcc,mingw,codeblocks,fstream,Gcc,Mingw,Codeblocks,Fstream,如何修复我的代码块编译程序使用fstream,无法打开20 MB大的文件? #包括 #包括 #包括 使用名称空间std; int main(){ char fileInputPath[256]=“D:\25mb.file”; ifstream fileInput(fileInputPath,ios::in | ios::binary); 如果(fileInput.is_open()!=true)您是否尝试过“D:/25mb.file”或“D:\\25mb.file”?这是否回答了您的问题? #i

如何修复我的代码块编译程序使用fstream,无法打开20 MB大的文件?
#包括
#包括
#包括
使用名称空间std;
int main(){
char fileInputPath[256]=“D:\25mb.file”;
ifstream fileInput(fileInputPath,ios::in | ios::binary);

如果(fileInput.is_open()!=true)您是否尝试过
“D:/25mb.file”
“D:\\25mb.file”
?这是否回答了您的问题?
#include <iostream>
#include <fstream>
#include <string>

using namespace std;

int main(){
     char fileInputPath[256] = "D:\25mb.file";
     ifstream fileInput(fileInputPath, ios::in|ios::binary);
     if (fileInput.is_open() != true) cout << "File not opened.\n";
     return 0;
}