Wednesday, July 24, 2013

An Easier Way?

Newsgroup: comp.lang.c++

Subject: An Easier Way?

From: mrc2323@...

Date: Tue, 23 Jul 2013 16:07:59 -0700



The code below seems clumsy; I'm only replacing some C-based

"sprintf" logic here. Is there a simpler and slicker way to do this

sort of thing? TIA



time_t nEstTime = 0; // some value...

ostringstream ossw;

string estTimeStr;

ossw.clear(), ossw << setw(6) << nEstTime, estTimeStr = ossw.str();







via Usenet Forums - Usenet Search,Free Usenet - comp.lang.c++ http://www.pocketbinaries.com/usenet-forums/showthread.php?49518-An-Easier-Way&goto=newpost

View all the progranning help forums at:

http://www.pocketbinaries.com/usenet-forums/forumdisplay.php?128-Coding-forums

No comments:

Post a Comment