--------------------Configuration: LS - Win32 Debug--------------------
Compiling...
LS.CPP
C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\LS.CPP(44) : error C2373: 'read_username' : redefinition; different type modifiers
C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\LS.CPP(40) : see declaration of 'read_username'
C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\LS.CPP(45) : error C2373: 'read_password' : redefinition; different type modifiers
C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\LS.CPP(41) : see declaration of 'read_password'
执行 cl.exe 时出错.
LS.OBJ - 1 error(s), 0 warning(s)
我定义了两个字符串数组:
char read_username[13];
char read_password[6];
然后加了个输入语句:
std::cin>>read_username;
进行比较时是这么比较的:
strcmp(数组1,数组2)
应该没错啊!为什么会报错?
由于总体代码太长,就不发了
为什么我用下述函数进去时用户名和密码输什么都行啊:
void save_username()
{
ofstream in;
in.open("用户名.txt",ios::trunc);
in<
cout<<"The username was saved successfully!"<
void read_username()
{
fstream out;
out.open("用户名.txt",ios::in);
out.getline(read_username_verb,13,'\n');
out.close();
}