Hello All.
Anyone have an issue with Windows Defender flagging a trojan attack? Specifically Trojan:Win32/Wacatac.D5!ml
It seems to be a false positive but I’m curious to know other people’s experience.
The other issue I have is that the .exe file disappears after a minute or so, so it’s difficult to get to the bottom of the game.
Here is my code:
#include <iostream>
#include <cstdio>
#include <ctime>
using namespace std;
void ImageGenerator ()
{
printf(R"EOF(
---------------------------------------------------------------
| oooo oooooo oo oooooooo oo oo |
| oo o oo o o oo oo oo |
| oo o ooooo oooooo oo oooooooooo |
| oo o oo o o oo oo oo |
| ooooo oooooo o o oo oo oo |
|-------------------------------------------------------------|
...
;::::;
;::::; :;
;:::::' :;
;:::::; ;.
,:::::' ; OOO\
::::::; ; OOOOO\
;:::::; ; OOOOOOOO
,;::::::; ;' / OOOOOOO
;:::::::::`. ,,,;. / / DOOOOOO
.';:::::::::::::::::;, / / DOOOO
,::::::;::::::;;;;::::;, / / DOOO
;`::::::`'::::::;;;::::: ,#/ / DOOO
:`:::::::`;::::::;;::: ;::# / DOOO
::`:::::::`;:::::::: ;::::# / DOO
`:`:::::::`;:::::: ;::::::#/ DOO
:::`:::::::`;; ;:::::::::## OO
::::`:::::::`;::::::::;:::# OO
`:::::`::::::::::::;'`:;::# O
`:::::`::::::::;' / / `:#
::::::`:::::;' / / `#
)EOF");
}
void PrintIntroduction (int Difficulty)
{
std::cout << "\n \nYou're in a dark room and remember nothing.\n";
std::cout << "A screen flickers into luminescent life, and a message appears:\n\n";
std::cout << "You must enter the correct code. You are presently at Level " << Difficulty;
std::cout << "\nIf you fail you will die a slow painful death!!!\n\n";
}
bool PlayGame (int Difficulty)
{
PrintIntroduction (Difficulty);
const int CodeA = rand()%Difficulty+Difficulty +1;
const int CodeB = rand()%Difficulty+Difficulty +1;
const int CodeC = rand()%Difficulty+Difficulty +1;
const int CodeSum = CodeA + CodeB + CodeC;
const int CodeProduct = CodeA * CodeB * CodeC;
std::cout << "+ There are 3 numbers in the code" << std::endl;
std::cout << "\n+ The codes add-up to:" << CodeSum << std::endl;
std::cout << "\n+ The codes multiply to give:" << CodeProduct << std::endl;
int GuessA, GuessB, GuessC;
std::cin >> GuessA >> GuessB >> GuessC;
int GuessSum = GuessA+GuessB+GuessC;
int GuessProduct = GuessA*GuessB*GuessC;
std::cout << "You've entered: "<< GuessA <<" "<< GuessB <<" "<< GuessC << std::endl;
std::cout << "The sum of your choices is: "<< GuessSum << std::endl;
std::cout << "The multiplication of your choices is: "<< GuessProduct << std::endl;
if (GuessSum == CodeSum, GuessProduct==CodeProduct)
{std::cout << "That is correct, you may live another day. \n";
return true;
}
else
{
std::cout << "That is incorrect. \n If you do not succeed you will slowly rot in this cell...\n "<< std::endl;
return false;
}
}
int main()
{
srand(time(NULL));
ImageGenerator ();
int LevelDifficulty = 1;
const int MaxDifficulty = 5;
while (LevelDifficulty <= MaxDifficulty)
{
bool bLevelComplete = PlayGame(LevelDifficulty);
std::cin.clear();
std::cin.ignore();
if (bLevelComplete)
{
++LevelDifficulty;
}
}
std::cout << "You get to live, now go out and smell the roses. ";
return 0;
}
THANKS EVERYONE!