Some virus programs get really nervous when programs try to write .EXE files, which is what your compiler is doing. There may be a setting in the antivirus program you can tweak. If this isn't it (or the virus checker doesn't object to other C++ programs you are compiling), try commenting out portions of your code until you find out what it is about your program the virus checker doesn't like.
Asserts are 100% safe and 100% trustable... if your code is correct. A C++ assert will not expose you to any virus, nor should it be affected in any way by a virus checker. An assert is little more than an "if" statement that dissappears in release mode.
So here's what you need to know about asserts:
1. They typically aren't there in release mode, so if you're compiling for release the assert may appear to not trigger, but could actually be ignored. (This will depend on the type of asssert you are using).
2. You should never do anything inside an assert that can affect things. Like "ASSERT(x = x + 1)." This causes big and hard-to-find bugs because the behavior changes in a release build.
3. Asserts do not and should not replace normal debugging. They are there to watch for unexpected and undesirable data. It's also not supposed to be your primary error checking mechanism... it's for program errors, not routine errors (like read/write access problems).
I love asserts and use them all over. I believe in them and encourage others to write them. But the better way to do what you're trying to do is to use a debugger. Step through the code with your debugger and you should be able to find out what's going on faster and more easily than with an assert alone. Make friends with your debugger. Any time you invest in learning to step through your program will will be repaid 100 times over. Trust me.
Good luck.