www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/05/10/18:45:24

From: Endlisnis <s257m AT unb DOT ca>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Converting numbers to strings
Date: Mon, 10 May 1999 17:08:28 -0400
Organization: BrunNet
Lines: 30
Message-ID: <37374ACB.BA48C9DF@unb.ca>
References: <HhOCsDAf$YN3EwuI AT dunvegan1 DOT demon DOT co DOT uk> <0jzu8AArMaN3EwpJ AT dunvegan1 DOT demon DOT co DOT uk> <UTmZ2.2585$mW3 DOT 16026 AT newsfeed DOT slurp DOT net>
NNTP-Posting-Host: ftnts3c30.brunnet.net
Mime-Version: 1.0
X-Mailer: Mozilla 4.51 [en] (Win95; U)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

bowman wrote:

> > How do I do that in C++?
>
> #include <iostream>
> #include <strstream>
> #include <iomanip>
>
> 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;
> }

    What is the "seekp" there for?

--
     (\/) Endlisnis (\/)
          s257m AT unb DOT ca
          Endlisnis AT HotMail DOT com
          ICQ: 32959047




- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019