D:\VC6.0\Project\EXE\OpenFile.cpp(54) : error C2228: left of '.open' must have class/struct/union type
D:\VC6.0\Project\EXE\OpenFile.cpp(55) : error C2228: left of '.read' must have class/struct/union type fstream file();
file.open("c.las",ios::in|ios::out|ios::binary|ios::nocreate);
file.read(list,9);这是出错的地方,头文件包括了#include"fstream.h"
谁能指导下是怎么回事?
D:\VC6.0\Project\EXE\OpenFile.cpp(55) : error C2228: left of '.read' must have class/struct/union type fstream file();
file.open("c.las",ios::in|ios::out|ios::binary|ios::nocreate);
file.read(list,9);这是出错的地方,头文件包括了#include"fstream.h"
谁能指导下是怎么回事?
fstream file;
file.open("c.las",ios::in ¦ios::out ¦ios::binary ¦ios::nocreate);
file.read(list,9);
fstream file;
file.open("c.las",ios::in ¦ios::out ¦ios::binary ¦ios::nocreate);
file.read(list,9);
把file后面的括号去掉就可以了!
你试试!
fstream file;
file.open("c.las",ios::in ¦ios::out ¦ios::binary ¦ios::nocreate);
file.read(list,9);
fstream file("c.las",ios::in ¦ios::out ¦ios::binary ¦ios::nocreate)的,改用open函数后忘记括号了