TIP: Click on subject to list as thread! ANSI
echo: nthelp
to: Geo
from: Gregg N
date: 2004-10-30 15:10:56
subject: Re: Organizing source code

From: Gregg N 

Geo wrote:
>>C++ is a strongly-typed language. You can't use an int where a string is
>>expected.
>
>
> I figured this part
>
>
>>If you look up this function in MSDN,
>
>
> that's something I still can't do because I haven't yet installed MSDN on my
> laptop. Still need to switch from my 40 to my 80gig drive before I do that.

You don't need it installed. Just go to msdn.microsoft.com/library and you
will have access to the whole thing online.

>>Note that the ostringstream takes care of allocating the proper amount
>>of memory for the string.
>
>
> Oh cool, that's pretty slick so now I could even use long int if I wanted.
> Thanks, now I've got something to play with that will let me view the
> execution speed, as it runs now it's still very slow but I've got a
> beginning now.

You might get slightly faster performance if you reuse the ostringstream
object by moving its construction before the loop and resetting it (by
saying oss.str("")) inside the loop.

Gregg

--- BBBS/NT v4.01 Flag-5
* Origin: Barktopia BBS Site http://HarborWebs.com:8081 (1:379/45)
SEEN-BY: 633/267 270 5030/786
@PATH: 379/45 1 396/45 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.