[HH] c++ strings?

Greg London email at greglondon.com
Mon Nov 19 23:48:45 EST 2012


If this were perl I'd just do this:

sub wrapper1{
   my ($string)=@_;
   othersub( "prefix ".$string."postfix");
}

but I can't seem to find a nice clean (not a lot of extra characters)
way of doing this in C++.

I googled around and found a couple of examples that said to
use string streams and other classes.

None of them seemed to compile for me.

So, I need a way to write some code in C++ that makes it fairly
easy to handle strings, concatentations, string literals, and such
and pass it into other subrotines. I'd rather be able to avoid
declaring the size of the string and just let them do the right thing.

can anyone point me to a good URL for this?

Greg






More information about the Hardwarehacking mailing list