James Goethe
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::st rDup(rfb:: CStr(getIt emString(I DC_VAR)))) ;
One of my non-working versions
varName.replaceBuf(rfb::st rDup(rfb:: CStr((getI temString( IDC_VAR))+ "big.")));
Another of my non-working versions
char* duh = "big.";
varName.replaceBuf(rfb::st rDup(rfb:: CStr((getI temString( 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' ;)
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::st
One of my non-working versions
varName.replaceBuf(rfb::st
Another of my non-working versions
char* duh = "big.";
varName.replaceBuf(rfb::st
I dont think the + is going to work for a text variable.
Thanks guys. (of course it doesnt have to be 'house' ;)
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?
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::st rDup(rfb:: CStr(getIt emString(I DC_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
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::st
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
ASKER
Figured it out...
varName.replaceBuf(rfb::st rDup(rfb:: CStr(getIt emString(I DC_VAR)))) ;
strcat(varName.buf,"text with a period. See!");
Much simpler than I thought..
Thanks for the help..
varName.replaceBuf(rfb::st
strcat(varName.buf,"text with a period. See!");
Much simpler than I thought..
Thanks for the help..
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.