Kindly be advised we cannot cancel subscriptions or issue refunds on the forum.
You may cancel your Bitdefender subscription from Bitdefender Central or by contacting Customer Support at:

Thank you for your understanding.

My C++ file is being flagged as malicious by Bitdefender.


I am now studying C++ by making some simple programs that perform rudimentary calculations or other math-related tasks. I've been using Code:Blocks for this purpose, but whenever I generate a program, Bitdefender incorrectly flags it as malicious and deletes it. I tried adding it to a whitelist, but I write a lot of apps, and it would take too much time. Help! My virus protection software, Bitdefender, has wrongly flagged a safe file as malicious when it has never done so before. "(The virus is described as


  • Alexandru_BD


    It's difficult to know for sure what is causing this antivirus behaviour based solely on the above information.

    But my personal guess is that Advanced Threat Defense flags the programs as malicious, if it detects behavioural changes similar to the ones found in malware. It's a Bitdefender feature that continuously monitors running processes to identify anomalies in apps behavior and correlates different suspicious behaviors to significantly improve detection. Thus we could say it's a false positive. Try to add the programs as .exe exceptions and this should stop Advanced Threat Defense from interfering with their legitimate process. You can follow the steps from here (if not already done) and if this doesn't solve the issue, please contact our Support Teams for a more in-depth investigation of the machine:

    Use this link and choose the desired contact channel to get in touch with our engineers, if needed:


    Premium Security & Bitdefender Endpoint Security Tools user

  • Flexx
    edited November 2022

    First we need to know if it is a signature based detection or is it the behaviour blocker/ advanced threat defense that is blocking the execution of file.

    Perform below steps:

    1) Temporarily disable Bitdefender Protection:

    2) Set exclusion in Bitdefender Antivirus:

    3) Upload your c++ file to and share the virustotal link here.

    4 Re-enable real time protection in Bitdefender.

    @Alexandru_BD while we know that advanced threat defense only allows .exe file as an exclusion, but the user is working on c++ file and the executable extension of c++ file is .cpp which I guess will not set up as exclusion in advanced threat defense. So even if the user will change the file extension from .cpp to .exe, for once the file will be set as an exclusion in advanced threat defense but then the file will not execute in c++ program which will make the file useless and if the user will keep extension of file as .cpp to be executed in c++ program then bitdefender will not allow it to run


    Life happens, Coffee helps!

    Show your Attitude, when you reach that Altitude!

    Bitdefender Ultimate Security Plus (user)

  • Alexandru_BD

    Thank you @Flexx, fair point, I did not take this into consideration 😅 let us know if the above steps are helpful.


    Premium Security & Bitdefender Endpoint Security Tools user