Dont know anything about your virus but I do know that whoever tutorial you were watching that told you to write 2 endl's does not realize his typo. Basically you resetted and flushed the buffer twice so practically didnt execute nothing
Your computer is probably just in panic and since it cant understand the code it takes it for something else.
Also,
Yes it is an illegal instruction that you may not execute a .exe file. Based on Hacker protection. I used to hack. And for game hacking we would always have to crack the game hack shield with a hex decimal code, crack the c shell, and input a .dll file to the main source files of the game... hahahahahah what am i talking about?
hehehheheheeheheheheheh........