The function you need is
int unlink(char* pathname)
where pathname is the file you want to delete. You can use an absolute pathname, or a pathname relative to the current working directory of your program.
On unix/linux you will need to include <unistd.h>
On windows, the function starts with an underscore: _unlink and you will need to include <io.h> and <stdio.h>
Windows may have other functions as well. What platform are you developing on?