(Help) Trojan in TripleX.exe

hello everyone. i am in TripleX section and working on Comparing Values video. I don’t remember which code that windows defender started giving error after i added, suddenly there appeared a trojan error. now it detects trojan in triplex.exe everytime i compile triplex.cpp. my code is this at the moment:

#include <iostream>

void PrintIntroduction(int Difficulty)
{
    // Introductory message and instruction to start the game
    printf("\n\n%d. seviye kantini soymak icin kantine giriyorsun.\n", Difficulty);
    std::cout << "Iceri sizmak icin sifreyi dogru girmelisin...\n\n";
}

bool PlayGame(int Difficulty)
{
    PrintIntroduction(Difficulty);

    // Declare 3 number for the code
    const int SifreA = 4;
    const int SifreB = 3;
    const int SifreC = 2;

    const int SifreToplam = SifreA + SifreB + SifreC;
    const int SifreCarpim = SifreA * SifreB * SifreC;

    // Print SifreToplam and product to the terminal
    std::cout << "-Sifre 3 tane rakam iceriyor\n";
    std::cout << " >Rakamlarin toplami: " << SifreToplam;
    std::cout << "\n >Rakamlarin carpimi: " << SifreCarpim;

    //Store player's guess
    int TahminA, TahminB, TahminC;
    std::cout << "\nSifreyi gir: ";
    std::cin >> TahminA >> TahminB >> TahminC;
    std::cout << "\nSifre Kontrol Ediliyor... \n\n";

    int TahminToplam = TahminA + TahminB + TahminC;
    int TahminCarpim = TahminA * TahminB * TahminC;

    //Check if player's guess is correct
    if (TahminToplam == SifreToplam && TahminCarpim == SifreCarpim)
    {
        std::cout << "Kapi acildi! Iceridesin.\n";
        return true;
    }
    else
    {
        std::cout << "Sifre yanlis! Alarm caldi ve yakalandin.\n";
        return false;
    }
}

int main()
{
    int LevelDifficulty = 1;
    const int MaxLevel = 5;

    while (LevelDifficulty <= MaxLevel)
    {
        bool bLevelComplete = PlayGame(LevelDifficulty);
        std::cin.clear(); //hataları giderir
        std::cin.ignore(); //discards the buffer
        if (bLevelComplete)
        {
            ++LevelDifficulty;
        }
        
    }
    
    std::cout << "Tebrikler! Simdi kantini istedigin gibi yagmalayabilirsin..\n";
    
    return 0;
}

You might have a virus which attaches itself to your program.

it is about the code itself, neither vscode nor .cpp file. i create new file and compile it, it still find trojan. i also compiled a different code and it didn’t find trojan. so it is about the code i wrote so far

What’s the code for the one that doesn’t give you a trojan?
Also have you tested them on virustotal.com too?

other code was a part of the main code actually. and i tested code on virustotal and here is the result: https://www.virustotal.com/gui/file/1363a3c7a9e5591446bc9c8b9efa1e3e60d8feb3cc0e1a5831f17bf7a078103d/detection
only 2 antivirus (including microsoft defender which i use) finds trojan… so is it ok to ignore trojan?

Then it’s probably not a false positive and your system is infected

https://stackoverflow.com/questions/35466000/program-i-just-made-is-apparently-a-virus-c/35466945#35466945

Privacy & Terms