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

Posted on 2005-04-12
Last Modified: 2010-04-01
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)


One of my non-working versions

Another of my non-working versions
char* duh = "big.";

I dont think the + is going to work for a text variable.
Thanks guys.  (of course it doesnt have to be 'house'  ;)
Question by:HypercubeTech
    LVL 5

    Expert Comment

    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?
    LVL 4

    Author Comment

    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
    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
    LVL 4

    Author Comment

    Figured it out...

    strcat(varName.buf,"text with a period. See!");

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

    LVL 14

    Expert Comment

    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.

    EE Cleanup Volunteer
    LVL 1

    Accepted Solution

    PAQed with points refunded (125)

    EE Admin

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
      Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
    The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
    The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now