I was playing with CodeBlocks and ran this,but suddenly Kaspersky(anti-virus) detected my debug file as a Trojan "Trojan.Win32.Agent.vxrx".Where's the problem, is it the code?,IDE?
I know I inserted the "c" without reason and that "b!=c" should be "b!=a,and although i corrected it, it's still viewed as Trojan by Anti-virus.
Maybe,But then my PC started bugging and I couldn't open any .exe.Don't get me wrong,I keep my PC clean, full scan every now and then,it must be the code,I just don't understand what makes it act like a Trojan.
That's quite strange, I have never encountered any problem with CodeBlocks so far. Maybe you can mark it as save or add it to a so called "Ignored Items" list in your AV. Hope this will solve the problem.
dunno, but when I remove the std:: it says me "cout and cin were not declared in this scope which is strange because i have opened the iostream library. When I open the code and enter a number, it closes my console after a while. This isn't normal because I use codeblocks 11.05 and it automatically uses System ("Pause") at the end of program. Super strange. I thing that while(b!=c) should not start up the antivirus because I used it lots of times and no antivirus.
Its not that your code is being seen as a virus, Code::Blocks uses MinGW to emulate a Unix environment so that GCC can run and compile your code. Some times the anti-virus software will see this emulation as an attempt to attack your program that is being emulated by MinGW after it has been compiled. As to why your PC started bugging out could be many reasons, but I know that some anti-virus programs see MinGW as an attacker sometimes, specifically the free version AVG has this problem a lot.
Also your while(b!=c) doesn't make any sense because you never initialize c to have any value so the program will just run for a random amount of time
edit: also you're having the problem using cin and cout without the std:: even with #include <iostream> because you don't have a usingnamespace std; statement before your main function.