From: "bowman" Newsgroups: comp.os.msdos.djgpp References: <0jzu8AArMaN3EwpJ AT dunvegan1 DOT demon DOT co DOT uk> Subject: Re: Converting numbers to strings Lines: 27 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2014.211 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 Message-ID: Date: Sun, 9 May 1999 15:12:20 -0600 NNTP-Posting-Host: 208.26.212.77 X-Trace: newsfeed.slurp.net 926284404 208.26.212.77 (Sun, 09 May 1999 16:13:24 CDT) NNTP-Posting-Date: Sun, 09 May 1999 16:13:24 CDT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Paul Richards wrote in message news:0jzu8AArMaN3EwpJ AT dunvegan1 DOT demon DOT co DOT uk... > > How do I do that in C++? ----------------------------------- snip ------------------------------------ #include #include #include int main() { ostrstream ostr; for (int i=0; i<20; i++) { ostr << "pic" << setfill('0') << setw(3) << i << ".bmp" << ends; cout << "filename = " << ostr.str() << endl; ostr.seekp(0); } return 0; }