forked from mindspore-Ecosystem/mindspore
!22497 [MS][LITE][Develop] fix c++ example for vs
Merge pull request !22497 from sunsuodong/fix_vs_run
This commit is contained in:
commit
a264e361c2
|
@ -61,7 +61,7 @@ char *ReadFile(const char *file, size_t *size) {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
std::ifstream ifs(file);
|
||||
std::ifstream ifs(file, std::ifstream::in | std::ifstream::binary);
|
||||
if (!ifs.good()) {
|
||||
std::cerr << "file: " << file << " is not exist." << std::endl;
|
||||
return nullptr;
|
||||
|
|
|
@ -60,7 +60,7 @@ char *ReadFile(const char *file, size_t *size) {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
std::ifstream ifs(file);
|
||||
std::ifstream ifs(file, std::ifstream::in | std::ifstream::binary);
|
||||
if (!ifs.good()) {
|
||||
std::cerr << "file: " << file << " is not exist." << std::endl;
|
||||
return nullptr;
|
||||
|
|
Loading…
Reference in New Issue