Should this piece of code provoke my antivirus by any chance?Code:#include<iostream> using namespace std; int main() { int sum=0 ,i; for(i=0;i<100;i++) { do{ (sum+=i); } while (i%2!=0); } cout<<sum<<endl; return 0; }
Should this piece of code provoke my antivirus by any chance?Code:#include<iostream> using namespace std; int main() { int sum=0 ,i; for(i=0;i<100;i++) { do{ (sum+=i); } while (i%2!=0); } cout<<sum<<endl; return 0; }
> Should this piece of code provoke my antivirus by any chance?
No.
Which AV software are you using?
Some (Eg Comodo, which I use) operate white-lists of known good files. Since the checksum will change every time you recompile, it seems like a new file to the AV, which has to be relisted as "good".
You might consider adding an exception rule for your development directory to stop the AV from checking things you're working on.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Maybe the AV has a really good heuristic which is spotting that pointless infinite loop...
Code://try //{ if (a) do { f( b); } while(1); else do { f(!b); } while(1); //}