totallyfreeenergy wrote:
> What is the easiest way to continuously catenate strings without having to 
> allocate any memory/size of destination string. I am using VC++ 2008 express. 
> Many thanks in-advance for any info on this.
> 
> TFE
> http://totallyfreeenergy.zxq.net

Are you wanting the performance-friendly solution or the quick-n-dirty 
solution?

Performance-friendly is to precalculate exactly how much RAM you need 
and then allocate it all in one big chunk and then copy all the strings 
at once.

Quick-n-dirty is to use a class/template like BString which optimally 
manages concatenations (2 x memory needed = reasonable room for growth) 
but falls flat on its face when it needs to manages lots of little 
chunks of data.

It highly depends on the scenario.  Personally, I start with BString 
and, only when performance is awful, switch to a more 
performance-friendly approach in key sections.  Gets the code written 
quickly and something working.

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.1
Get on task.  Stay on task.

http://www.CubicleSoft.com/MyTaskFocus/

Reply via email to