Link to home
Start Free TrialLog in
Avatar of James Goethe
James GoetheFlag for United States of America

asked on

Help appending a text with a period variable to another variable. (rfb)

I need to append a peice of text with periods in it to the IDC_VAR variable.
if IDC_VAR ends up being    
"My house is"      {without the " quotes }

I want to append
"big. Wow!"        {without the " quotes }
to the end (just an example)

Original
varName.replaceBuf(rfb::strDup(rfb::CStr(getItemString(IDC_VAR))));

One of my non-working versions
varName.replaceBuf(rfb::strDup(rfb::CStr((getItemString(IDC_VAR))+"big.")));

Another of my non-working versions
char* duh = "big.";
varName.replaceBuf(rfb::strDup(rfb::CStr((getItemString(IDC_VAR))+duh)));

I dont think the + is going to work for a text variable.
Thanks guys.  (of course it doesnt have to be 'house'  ;)
Avatar of beryl666
beryl666
Flag of United States of America image

i don't understand what you mean? is it in c++? why don't you use copy both text into string type then use string to append or + together then write it back to original place? is it easier?
Avatar of James Goethe

ASKER

it is c++
i need to append  some text to the end of IDC_VAR with some punctuation
lets say IDC_VAR =    "Programming is"
 
i need this string
varName.replaceBuf(rfb::strDup(rfb::CStr(getItemString(IDC_VAR))));
to equal   "Programming is fun."
its really just   CStr(getItemString(IDC_VAR));  
somehow i need to add some actual text to the value of IDC_VAR

thanks again
Figured it out...

varName.replaceBuf(rfb::strDup(rfb::CStr(getItemString(IDC_VAR))));
strcat(varName.buf,"text with a period. See!");


Much simpler than I thought..
Thanks for the help..

Avatar of wayside
wayside

No comment has been added to this question in more than 21 days, so it is now classified as abandoned..
I will leave the following recommendation for this question in the Cleanup topic area:

PAQ - Refund

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

wayside
EE Cleanup Volunteer
ASKER CERTIFIED SOLUTION
Avatar of Computer101
Computer101
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial