|
From: Daniel G. <sp...@ho...> - 2002-06-11 14:27:44
|
if you are using the same object to write multiple variables into the text
document try destroying the object then re-creating it before you do the
next one.
It's a bit like the following.
e.g.
[code]
/**
Object with local scope
Notice how the strstream object is created with local scope. Local
scope
ensures the object is destroyed, then created the next time it
is needed. This has the effect of making sure that no previous
values will be carried forward to the next usage of the object.
*/
{ // Display X Resolution
strstream StrstreamObject;
StrstreamObject << "XResolution: " << m_nXResolution << '\0';
pListbox->AddString(StrstreamObject.str());
StrstreamObject.rdbuf()->freeze(0);
}
{ // Now for the Y resolution
strstream StrstreamObject;
StrstreamObject << "YResolution: " << m_nYResolution << '\0';
pListbox->AddString(StrstreamObject.str());
StrstreamObject.rdbuf()->freeze(0);
}
[/code]
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
|