这样也叫木马,为什么?
本人新手,这个代码写得不好,但是为什么为被360拦截,说是木马呢?求大神们指教。
int main()
{
Sales_item item1,item2;
int count = 1;
if( cin >> item1 )
{
while(cin >> item2)
if ( item1.same_isbn(item2))
cout << count << endl;
++count;
}
else{
cout << count << endl;
item1 = item2;
count = 1;
}
cout << count << endl;
return 0;
}
[解决办法]
int main()
{
cout<<"本程序的作者刚刚做出了一个艰难的决定:本程序和360软件不兼容。卸载360运行本程序输入y;不卸载360退出本程序输入n"<<endl;
char yn;
cin>>yn;
if ('y'!=yn) return -1;
Sales_item item1,item2;
int count = 1;
if( cin >> item1 )
{
while(cin >> item2)
if ( item1.same_isbn(item2))
cout << count << endl;
++count;
}
else{
cout << count << endl;
item1 = item2;
count = 1;
}
cout << count << endl;
return 0;
}