Welcome to our forums...

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Forum Statistics

  • Forum Members:
  • Total Threads:
  • Total Posts: 7
There are 1 users currently browsing forums.
C and C++ Programming C and C++ are both robust and hugely popular programming languages that are used in multiple facets of programming, ranging from games to operating systems to simple text editors. To dicuss and seek advice, ask around here.

Reply
  #1  
Old 03-07-2010
Toddler
 
Join Date: Mar 2010
Posts: 6
Rep Power: 0
Kensmelardo is on a distinguished road
AVG / Dev C++ / Virus?

I downloaded Dev C++ and wrote a program based on a YouTube tutorial video I was watching. None of the comments lead me to believe that there's anything wrong with this code or the user in general.

When I compile the code my AVG flags it as a Trojan virus and won't let me execute the file. So I turned it off and tried to compile and execute again. Nothing happens. When I click on the .exe file or try to run it from the Command Prompt it says I don't have permission to run the program. It's a simple program for crying out loud.

What am I doing wrong here?

Here's the code...

#include<iostream>
using namespace std;

int main(void)
{

double dnumber1 = 0.0;
double dnumber2 = 0.0;
double dnumber3 = 0.0;
double daverage = 0.0;

cout << "Please enter 3 numbers: " << endl;
cin >> dnumber1;
cin >> dnumber2;
cin >> dnumber3;

daverage = (dnumber1 + dnumber2 + dnumber3) / 3;

cout << "The average of the numbers are: " << daverage << endl << endl;

system("pause");
return 0;

}
Reply With Quote
  #2  
Old 03-07-2010
Toddler
 
Join Date: Mar 2010
Posts: 6
Rep Power: 0
Kensmelardo is on a distinguished road
Re: AVG / Dev C++ / Virus?

Well I did get the program working, but I'm a bit puzzled as to why or how.

The code above is exactly as the video has it typed out, but I removed one of the "endl" commands in line 19. Why does there need to be two when the program seems to work fine with only one? Also, why would it read as a virus with two?
Reply With Quote
  #3  
Old 03-26-2010
Toddler
 
Join Date: Mar 2010
Posts: 11
Rep Power: 0
bi-NARY is on a distinguished road
Re: AVG / Dev C++ / Virus?

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........
Reply With Quote
  #4  
Old 03-28-2010
New Born
 
Join Date: Mar 2010
Posts: 2
Rep Power: 0
haxer is on a distinguished road
Re: AVG / Dev C++ / Virus?

#include<iostream>
using namespace std;

int main(void)
{

double dnumber1 = 0.0;
double dnumber2 = 0.0;
double dnumber3 = 0.0;
double daverage = 0.0;

cout << "Please enter 3 numbers: " << endl;
cin >> dnumber1;
cin >> dnumber2;
cin >> dnumber3;

daverage = (dnumber1 + dnumber2 + dnumber3) / 3;

cout << "The average of the numbers are: " << daverage <<endl;

system("pause");
return 0;

}

"that's it"
Reply With Quote
  #5  
Old 03-28-2010
New Born
 
Join Date: Mar 2010
Posts: 2
Rep Power: 0
haxer is on a distinguished road
Re: AVG / Dev C++ / Virus?

and is not necessary to given varibles values like "double dnumber2 = 0.0;"
however its good
Reply With Quote
  #6  
Old 03-28-2010
Mancunian
 
Join Date: Mar 2010
Location: Greater Manchester, UK
Age: 18
Posts: 23
Rep Power: 0
Dumaju is on a distinguished road
Re: AVG / Dev C++ / Virus?

I'd say it's pretty necessary to get in the habit of initialising your declared variables.
Reply With Quote
  #7  
Old 06-05-2010
New Born
 
Join Date: Jun 2010
Posts: 1
Rep Power: 0
megabyte is on a distinguished road
Re: AVG / Dev C++ / Virus?

Quote:
Dumaju originally posted: View Post
I'd say it's pretty necessary to get in the habit of initialising your declared variables.
Not necessarily...
Reply With Quote


Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Do You Use a Virus Scanner? leo Windows/Microsoft 41 04-25-2008 04:51 AM
Virus! tralfas Unix/Linux/BSD 6 04-21-2008 05:38 PM
AVG paid or free? haydenbech Windows/Microsoft 12 11-09-2007 02:58 AM
Dev C++ vs Microsoft Visual C++ yohan610 C and C++ Programming 2 07-23-2007 05:09 AM
Dev C++ and headers. Gustav C and C++ Programming 12 08-25-2005 05:41 PM