关于do-while循环的小bug~~~
#include<iostream>#include<string>
using namespace std;
int main()
{
string password;
cout<<"enter your password"<<'\n';
cin>>password;
while(password!="baby")
{
cout<<"wrong password-try again"<<'\n';
cin<<password;
}
do
{
if(password == "")
{
cout<<"enter your password";
}
else
{
cout<<"wrong password-try again";
}
cin<<password;
}while(password!="baby");
}
16行的地方(加粗)
if那行为什么报错 stray ‘\243’ in program
是什么意思????