Antivirus issues

I have Avast! Antivirus installed on my computer and was writing a program with file IO and for some reason it won't let me run it. I try to run it with there recommendations and it doesn't work and then I try to run it normally and it won't let me. Has anyone else had problems with antivirus software overriding you?
Are you using system() anywhere in the program, by any chance?

-Albatross
closed account (zb0S216C)
I use Avast as well along with S.A.S( Super Anti Spyware ). Maybe Avast is picking up something it thinks is malicious or potentially harmful. Avast is just doing what it was programmed to do. Albatross specified the use of system( ) which can in fact cause some anti-viruses to quarantine your program( which might be the reason why your program is refusing to run ).
<unhelpful and somewhat off topic>

Virus scanners are worse than any virus. Why people would willingly use them is beyond me. I'm forced to use one at work, but I wouldn't dare install one on my home PC. What's more... lots of people actually pay money for that crap which completely blows my mind.

</unhelpful and somewhat off topic>
...and that is why you should switch back to Linux, Disch. No widespread viruses, nor anti-virus programs. ;)

In all fairness, though, we can't tell why your antivirus program is objecting to your program without seeing your code, Caesar1. All we can do is make guesses.

-Albatross
Last edited on
All it takes to not get Viruses is to use common sense.
No widespread viruses
that you can see =) =)

Just kidding. I really agree with your last comment Disch. I have had my laptop running without an "antivirus" (really just a virus, it spreads and does things I don't want it to) and I haven't had a single problem. With a little knowhow you can remove nearly every virus manually.
Sorry it's been almost a month, but school has been keeping me very busy and I haven't had time to be programming. Here is my code; I'm trying to use file IO, so trying to create a file might have something to do with the problem. If anyone is still using this thread I'd appreciate any constructive comments.


#include <iostream>
#include <fstream>
#include <cstring>

using namespace std;

int main()
{
string filename;
string file;
string userinput;
string a = a;
string b = b;

cout<<"Would you like to:\n a) Create a new text document or\n b) Open a previous document?\n";
cin>>userinput;
if (userinput==a)
{
cout<<"File name: \n";
cin>>filename;
ofstream a_file (filename.c_str());
cout<<filename<<"is ready for use.\n";
while(getline(cin, file) && file != "quit")
{
a_file<<file<<endl;
}
}
else if (userinput==b);
{
cout<<"File you want to open: \n";
cin>>filename;
ofstream a_file (file.c_str());
a_file<<file;
cout<<file<<endl;
}
cin.get();
}
Hm, I don't see anything wrong with that...maybe the antivirus is complaining that you are making a new file or something. Maybe you could try disabling it temporarily and see what happens.
Your AV could be compromised. Do you have another computer you can test it out on?
Topic archived. No new replies allowed.