一个小问题,求解答:“file not recognized: File format not recognized”
下面是源代码,
不知道为什么错。。。
#include <iostream>
#include <string>
using namespace std;
int main()
{
string A ="too high";
string B ="too low";
string C ="right on";
string N = " ";
int n;
int high = 10;
int low = 0;
int p = 2;
for (N != C)
{
cin >> n;
cin.ignore();
getline(cin,N);
if(N == A)
{
high = n;
}
else if(N == B)
{
low = n;
}
if(high < low)
p = -1;
}
if (p == -1)
cout >> "Stan is dishonest";
else
cout >> "Stan may be honest";
return 0;
}
谢谢大家啦