#2
zklhp2014-11-16 23:41
|
syntax error : missing ';' before '<class-head>'
fatal error C1004: unexpected end of file found错误真的号郁闷到底是哪错了 求指教啊
程序代码:
#include <iostream>
#include<windows.h>
#include<fstream>
using namespace std
struct FishOil
{
std::string name;
std::string uid;
char sex;
};
bool Init();//初始化
bool Read();//读
void Record();//记录
bool WriteFishC(FishOil *OilData);
int main()
{
int i;
Init();
while(1)
{
std::cout<<"1. 打印到屏幕";
std::cout<<"2.是否录入文件";
std::cout<<"3.退出程序";
switch(1)
{
case 1:
if(Read())
std::cout<<"文件读取成功";
else
std::cou<<"文件读取失败";
break;
case 2:
Record;
break;
case 3:
return 0;
}
}
return 0;
}
#include<windows.h>
#include<fstream>
using namespace std
struct FishOil
{
std::string name;
std::string uid;
char sex;
};
bool Init();//初始化
bool Read();//读
void Record();//记录
bool WriteFishC(FishOil *OilData);
int main()
{
int i;
Init();
while(1)
{
std::cout<<"1. 打印到屏幕";
std::cout<<"2.是否录入文件";
std::cout<<"3.退出程序";
switch(1)
{
case 1:
if(Read())
std::cout<<"文件读取成功";
else
std::cou<<"文件读取失败";
break;
case 2:
Record;
break;
case 3:
return 0;
}
}
return 0;
}
代码