This is my simple C++ program wich have a function that fakes a virus! It looks like it searching for your hard drive, download a virus, and 'plant' it to the hard drive ^^ i made this to prank my friend lol, but you can see alot of other functions too, that's cuz this actually is a text based rpg game =P but i didnt feel like to make a new program for this little prank, now i can trick ppl who play this game lol!!
How did you make the loading effect?
ChaseandDonny 1 year ago
@ChaseandDonny You'll need to include "Windows.h" for it to work, then just make a function which wait for the time you send as parameter, here's a working function for that:
void loading( int time ) // 1000 = 1 second
{
for( int i = 3; i > 0; i-- ) // do this 3 times
{
Sleep( time / 3 ); // wait for 1/3 of the time
std::cout << "."; // print out a dot
}
}
oonmm 1 year ago