logmsg.h
void LOGMSG(string logmsg,...)//...
{
stringstream name;
name<<"test "<<TM.years()<<"-"<<TM.month()<<"-"<<TM.day()<<".log";
ofstream log;
log.open(name.str(), ios::out | ios::app);
log <<TM.hour()<<":"<<TM.mint()<<":"<<TM.sec()<<" Message: "<< logmsg<<endl;
}
main.cpp
int main()
{
int a = 100;
LOGMSG("type test!!",a,"times");
}
but it's only wtite into the file "type test!!" while i want it to type in "type test 100 times"
how can i do that