我第一次在开发控制台中编译并运行我的程序时,当我打开它时,我的电脑开始滞后,它在我的桌面上创建了一堆 .tmp 文件,名称类似于trzFE47.tmp我的电脑开始滞后我不得不关闭我的电脑我什至检查过任务管理器的后台进程处理可疑的事情,但我什么也没发现,所以当我重新启动我的电脑时,我再次编译我的 .cpp 程序,avast 给了我一个警告,说在我的代码中检测到可疑项目
#include <iostream>
#include <string>
#include <cstdlib>
#include <ctime>
#include <windows.h>
#include <stdio.h>
#include <tchar.h>
using namespace std;
int main() {
int l;
int a;
int b;
int c;
Sleep(3000);
srand(time(0));
l = 1+rand()%6;
a = 1+rand()%6;
b = 1+rand()%6;
c = 1+rand()%6;
cout << a << endl << b << endl << c << endl;
if (a==b&& b==c&&c==a){
int v;
cout << "you win";
cin >> v;
}else{
cout << "try again?";
string z;
cin >> z;
if (z == "yes"){
main();
}
}
return 0;
}
Run Code Online (Sandbox Code Playgroud)
Avast 倾向于认为它以前从未见过的任何程序都是“可疑的”。通常它会“扫描”程序,找不到任何东西并让您继续执行。对于大多数防病毒系统,最好将编译代码的文件夹添加到排除列表中。
与你的程序无关的一面,正如所指出的那样,你不能打电话main()
| 归档时间: |
|
| 查看次数: |
2456 次 |
| 最近记录: |