system("avg -scan");
Seriously though, isn't that just asking for the complete code of a virus scanner? You'll need to scan the directory structure from the root of each hard drive partition, then for each file open it, read the contents, then check the relevant contents against each virus you know about.

Writing an antivirus program is not a "little project". If you don't even know how to scan directories on a computer then this project is way way way beyond your abilities (c.f 5 minutes with Meccano and now wanting to build a full size replica of the Eiffel Tower); you should give up now and start a project that is more within your capabilities. For more details on the complexities of writing a virus scanner see my previous post in the thread