请使用手机微信扫码安全登录

切换账号密码登录

绑定手机号

应国家法规对于账号实名的要求,请您在进行下一步操作前,需要先完成手机绑定 (若绑定失败,请重新登录绑定)。了解更多

不绑定绑定手机号

360官网 | 360商城

推荐论坛版块活动360粉丝商城众测粉丝轰趴馆常见问题
首先,我们打开设置——安全防护中心——开发者模式,添加你的编译输出目录,即可屏蔽误报。(注:此方法有一定危险,请确定你编译的程序是否真的没有病毒)
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <math.h>
  4. #include <windows.h>

  5. #define MIN1 48
  6. #define MAX1 57

  7. #define MIN2 65
  8. #define MAX2 70

  9. #define SLEEP 200

  10. void color (char background_color,char foreground_color)
  11. {
  12.         char str[9]={'C','O','L','O','R',' ',' ',' ','\0'};
  13.         str[6]=background_color;
  14.         str[7]=foreground_color;
  15.         system(str);
  16. }

  17. int main()
  18. {
  19.         char background_color=0;
  20.         char foreground_color=0;
  21.         int count=0;
  22.         srand (rand());
  23.         puts ("hello, world");
  24.         while (!kbhit())
  25.         {
  26.         if (rand()%2==0)
  27.                 background_color=rand()%(MAX1-MIN1)+MIN1;
  28.         else
  29.                 background_color=rand()%(MAX2-MIN2)+MIN2;
  30.         if (rand()%2==0)
  31.                 foreground_color=rand()%(MAX1-MIN1)+MIN1;
  32.         else
  33.                 foreground_color=rand()%(MAX2-MIN2)+MIN2;
  34.         color (background_color,foreground_color);
  35.         putchar('\a');
  36.         Sleep (SLEEP);
  37.         count++;
  38.         }
  39.         color ('0','7');
  40.         system ("cls");
  41.         printf ("颜色共变化了%d次!\n",count);
  42.         system ("pause");
  43.         return 0;
  44. }
复制代码
比如这一段代码,虽然没有病毒,但被DevCpp编译输出后,却显示有病毒。若只有单个文件误报或不在同一个文件夹内的文件误报,建议添加信任。
(有兴趣的朋友们可以编译试试)

共 1 个关于C/C++、易语言和其他语言编译输出误报的朋友们,我为大家解答啦!的回复 最后回复于 2019-2-15 14:14

评论

直达楼层

360fans_u37215425 LV6.中尉 发表于 2019-2-15 14:14 | 显示全部楼层 | 私信
您需要登录后才可以回帖 登录 | 注册

本版积分规则

360fans_bG7Nqj LV1.上等兵

粉丝:0 关注:0 积分:3

精华:0 金币:2 经验:5

最后登录时间:2019-2-15

私信 加好友

最新活动

360云台摄像机9Pro写评论送大奖!

排行榜

热度排行 查看排行
今日 本周 本月 全部
    今日 本周 本月 全部

      内容推荐 热门推荐最新主帖

      扫码添加360客服号,涨知识的同时还有超多福利等你哦

      快速回复 返回顶部 返回列表