Click here to Skip to main content
15,888,984 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Code snippets for C++ in VS 8? Pin
S Douglas9-Feb-06 18:43
professionalS Douglas9-Feb-06 18:43 
QuestionReinitializing a strstream Pin
PJ Arends9-Feb-06 13:45
professionalPJ Arends9-Feb-06 13:45 
AnswerRe: Reinitializing a strstream Pin
_anil_9-Feb-06 14:07
_anil_9-Feb-06 14:07 
GeneralRe: Reinitializing a strstream Pin
PJ Arends9-Feb-06 14:20
professionalPJ Arends9-Feb-06 14:20 
GeneralRe: Reinitializing a strstream Pin
_anil_9-Feb-06 14:35
_anil_9-Feb-06 14:35 
GeneralRe: Reinitializing a strstream Pin
PJ Arends9-Feb-06 15:00
professionalPJ Arends9-Feb-06 15:00 
GeneralRe: Reinitializing a strstream Pin
_anil_9-Feb-06 15:34
_anil_9-Feb-06 15:34 
GeneralRe: Reinitializing a strstream Pin
PJ Arends9-Feb-06 15:42
professionalPJ Arends9-Feb-06 15:42 
#include <iostream>
#include <strstream>

using namespace std;

int main(int argc, char* argv[])
{
    unsigned x;
    ostrstream stream;
    for (x = 1; x < 10; ++x)
    {
        stream.seekp(0);
        stream << "%%" << x << ends;
        cout << stream.str() << endl;
    }

	return 0;
}
output is 9 lines of %%1

I rebooted my computer, created a new project just to test this and yet I still get the same result. Oh well, I guess I will go back to the inefficient way that works for me.

Thanks for your attempt to help.




"You're obviously a superstar." - Christian Graus about me - 12 Feb '03

"Obviously ???  You're definitely a superstar!!!" - mYkel - 21 Jun '04

"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05

Within you lies the power for good - Use it!
GeneralRe: Reinitializing a strstream Pin
_anil_9-Feb-06 15:56
_anil_9-Feb-06 15:56 
GeneralRe: Reinitializing a strstream Pin
PJ Arends9-Feb-06 16:15
professionalPJ Arends9-Feb-06 16:15 
GeneralGot it! Pin
PJ Arends9-Feb-06 15:53
professionalPJ Arends9-Feb-06 15:53 
AnswerRe: Reinitializing a strstream Pin
Bernhard9-Feb-06 19:51
Bernhard9-Feb-06 19:51 
QuestionHELP NEEDED HERE. PLEASE ANYONE!!!! Pin
jermzypeter9-Feb-06 13:00
jermzypeter9-Feb-06 13:00 
AnswerRe: HELP NEEDED HERE. PLEASE ANYONE!!!! Pin
George L. Jackson9-Feb-06 13:12
George L. Jackson9-Feb-06 13:12 
GeneralRe: HELP NEEDED HERE. PLEASE ANYONE!!!! Pin
jermzypeter9-Feb-06 13:18
jermzypeter9-Feb-06 13:18 
GeneralRe: HELP NEEDED HERE. PLEASE ANYONE!!!! Pin
George L. Jackson9-Feb-06 13:25
George L. Jackson9-Feb-06 13:25 
GeneralRe: HELP NEEDED HERE. PLEASE ANYONE!!!! Pin
jermzypeter9-Feb-06 13:33
jermzypeter9-Feb-06 13:33 
GeneralRe: HELP NEEDED HERE. PLEASE ANYONE!!!! Pin
Lord Kixdemp9-Feb-06 13:37
Lord Kixdemp9-Feb-06 13:37 
GeneralRe: HELP NEEDED HERE. PLEASE ANYONE!!!! Pin
George L. Jackson9-Feb-06 13:44
George L. Jackson9-Feb-06 13:44 
GeneralRe: HELP NEEDED HERE. PLEASE ANYONE!!!! Pin
jermzypeter9-Feb-06 13:52
jermzypeter9-Feb-06 13:52 
GeneralRe: HELP NEEDED HERE. PLEASE ANYONE!!!! Pin
George L. Jackson9-Feb-06 14:09
George L. Jackson9-Feb-06 14:09 
GeneralRe: HELP NEEDED HERE. PLEASE ANYONE!!!! Pin
jermzypeter9-Feb-06 14:24
jermzypeter9-Feb-06 14:24 
GeneralRe: HELP NEEDED HERE. PLEASE ANYONE!!!! Pin
George L. Jackson9-Feb-06 15:00
George L. Jackson9-Feb-06 15:00 
QuestionVStudio 2005 - Manifest file not working anymore? Pin
LukeV9-Feb-06 12:33
LukeV9-Feb-06 12:33 
AnswerRe: VStudio 2005 - Manifest file not working anymore? Pin
George L. Jackson9-Feb-06 13:19
George L. Jackson9-Feb-06 13:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.