How do i write a log file in VC++ for a particular application?
You should write your own log method/class/library, like this and this implementations
or use one third-party party log libraries. Log4cpp, for example.