当我编译我的c++代码时,avast认为这是一种病毒
when i compile my c++ code avast thinks its a virus
当我第一次在开发控制台中编译和运行程序时,当我打开它时,我的电脑开始滞后,它在我的桌面上创建了一堆名为trzFE47.tmp
的.tmp文件,我的计算机开始滞后。我不得不关闭我的电脑。我甚至与任务管理器一起检查了后台进程中的可疑内容,但我没有发现任何可疑内容,所以当我重新启动电脑时,我开始编译我的.cpp程序再次向我发出警告,说在我的代码中检测到可疑物品
#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;
}
Avast倾向于认为它以前从未见过的任何程序都是"可疑的"。通常它会"扫描"程序,找不到任何东西,然后让你继续执行。对于大多数防病毒系统,最好将编译代码的文件夹添加到排除列表中。
一方面与您的程序无关,正如所指出的,您不能调用main()
要测试编译的文件是否有病毒,只需将编译文件夹放在防病毒软件的例外中,然后右键单击该.exe文件并使用防病毒软件进行扫描。如果它报告了病毒,那么它确定你的文件包含病毒,如果没有,它应该说没有发现病毒或恶意软件。为我工作:)
对我来说最好的方法是将程序放在;允许";防病毒的列表(Avast’s)";允许的&被阻止的应用程序"菜单。
相关文章:
- 有符号的int和int-有没有一种方法可以在C++中区分它们
- 有一个打印语句的函数是一种糟糕的编程实践吗
- 有没有一种方法可以创建一个带有哈希表的数据库,该哈希表具有恒定时间查找功能
- 有没有一种方法可以在编译时获得作用域类名
- 对于C++中使用智能指针的指针算术限制,有没有一种变通方法
- 一种在C++中读取TXT配置文件的简单方法
- 有没有一种方法可以测量c++程序的运行时内存使用情况
- 有没有一种方法可以使用placement new将堆叠对象分配给分配的内存
- 在调用接收数组的方法时,模板化数组大小是不是一种糟糕的做法
- 有没有一种方法可以通过"typedef"为重新定义的基本类型定义特征和强制转换运算符
- 有没有一种"cleaner"的方法可以在指向基的指针向量中找到派生类的第一个实例?
- 有没有一种代码密度较低的方法来使用非默认构造函数初始化数组?
- 将错误返回给调用方而不是立即在 C++ 中抛出错误是否是一种好的做法
- 在 c++ 中,有一种方法可以创建一个包含地图作为值的树状地图?
- 有没有一种优雅而快速的方法来测试整数中的 1 位是否位于连续区域
- 在运行时检查继承是否只有一种类型和 void*
- C++ STD 函数运算符:有没有一种方法可以通过函数将一个向量映射到另一个向量上?
- 找到一种有效的方法,在 2 个巨大的缓冲区上执行 MAX,每字节字节
- 寻找一种更好的方法来表示无符号字符数组
- 当我编译我的c++代码时,avast认为这是一种病毒