Author Topic: AVG just thought that my Hello World program was a Trojan.  (Read 11606 times)

Offline minimildew

  • Single posting newcomer
  • *
  • Posts: 7
AVG just thought that my Hello World program was a Trojan.
« on: March 30, 2013, 09:50:18 am »
#include <iostream>

using namespace std;

int main ()
{
    cout<<"Hey, you, I'm alive! Oh, and Hello World! \n";
    cin.get();

    return 1;
}
So I typed this out in Code::Blocks, ran it, and AVG detected it as a trojan and immediately terminated it. Should I be worried in the slightest? Or is AVG simply as retarded as I suspect.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: AVG just thought that my Hello World program was a Trojan.
« Reply #1 on: March 30, 2013, 10:15:11 am »
We have several threads about AVG and false positives in the last thre month.

Throw it away and use better av-software.

Offline minimildew

  • Single posting newcomer
  • *
  • Posts: 7
Re: AVG just thought that my Hello World program was a Trojan.
« Reply #2 on: March 30, 2013, 10:20:30 am »
Yeah, that's what I thought. This may sound like an incredibly retarded question, but when I run the script, it creates an application file (.exe) of about 1 mb within the file that the script is run from. Is that normal?

Offline minimildew

  • Single posting newcomer
  • *
  • Posts: 7
Re: AVG just thought that my Hello World program was a Trojan.
« Reply #3 on: March 30, 2013, 10:21:26 am »
And there's also a random .o file sitting in there (sorry for the double post)

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: AVG just thought that my Hello World program was a Trojan.
« Reply #4 on: March 30, 2013, 10:25:34 am »
It looks like you don't know the absolute basics about compiling and linking.

This is not the correct site to teach such things (in fact it would violate our forum rules), but there are some tutorials and forums related to basic C/C++ programming questions in the web.

You should search and read them.

Offline minimildew

  • Single posting newcomer
  • *
  • Posts: 7
Re: AVG just thought that my Hello World program was a Trojan.
« Reply #5 on: March 30, 2013, 10:30:04 am »
Yes, I'm aware of my very limited knowledge (I'm attempting to learn, the hello world program is the first program I've created). I just wanted to know if there was any chance of danger to my PC. Thank you for your time.

LauraC

  • Guest
Re: AVG just thought that my Hello World program was a Trojan.
« Reply #6 on: June 08, 2013, 11:46:47 am »
I just started learning C++, and I couldn't do anything with CB because AVG kept telling me the files were infected.  Did some research, dumped AVG, and got Avast (free).  No probs now.  =)

GenesisArk

  • Guest
Re: AVG just thought that my Hello World program was a Trojan.
« Reply #7 on: August 23, 2013, 03:22:06 am »
I had that same problem, AVG thought that my C++ was a trojan. Well, I found this out after adding an exception in Avast! because it would auto-sandbox the programs. I wonder why such simple programs cause so much trouble. Here is my "Trojan" program:

Code
#include <iostream>

using namespace std;

int main() {
     cout<<"Hello world";
     cin.get();
}

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: AVG just thought that my Hello World program was a Trojan.
« Reply #8 on: August 23, 2013, 05:30:31 pm »
I had that same problem, AVG thought that my C++ was a trojan. Well, I found this out after adding an exception in Avast! because it would auto-sandbox the programs. I wonder why such simple programs cause so much trouble. Here is my "Trojan" program:

I don't think that the "Hello World" code is the problem, but the compiler witch create a exe. AVG (and many other av-software) think that a .exe created from a program must be a "Trojan" or "Virus"... The average dau nowadays isn't a programmer any more, but this goes into ot...

greetinga

Offline fred_76

  • Single posting newcomer
  • *
  • Posts: 4
Re: AVG just thought that my Hello World program was a Trojan.
« Reply #9 on: July 28, 2014, 10:37:09 am »
Hi!

I posted a tweak to this problem. It is here :
http://forums.codeblocks.org/index.php/topic,19491.0.html

Fred