Change Line wth CComBSTR

Posted on 2006-05-28
Last Modified: 2008-01-16

i have a very easy problem but im having a hard time finding a solution.
Im using CComBSTR wrapper to concatenate BSTRs, but i dont want them all in the same line because im buiding an html file.


i dont want  <html><body></body></html>

How can i add a new line so i can get:


Question by:andreof
    LVL 49

    Accepted Solution

    Add some CRLF (line breaks).  For instance:

              var.Append("<html>\r\n");    // note the \r\n that I have added.

    -- Dan
    LVL 49

    Expert Comment

    Out of curiosity....
    I believe I answered your question correctly.  Why did you decide to give me a "B" instead of an "A"?   How could I have answered this question any more correctly?

    Please see:
       Waht's the right grade to give?

    Author Comment

    well it was the first grade i gave, so i was with doubts.

    1. Your answer was correct and helped me a lot, thank you!

    2. I didn't know it, but you have to agree it was a very simple question, and i dont think that ANY answer to this question would be in A category:

    A: The Expert(s) either provided you with a thorough answer or they provided you with a link to information that thoroughly answered your question. An "A" can also be given to any answer that you found informative or enlightening beyond the direct question that you asked.

    3. 250 points for this one was a great deal ;)

    Sorry if you feel its unfair but it seemed to me as the right thing to do.

    Regards and thanks
    LVL 49

    Expert Comment

    Of course, the grading is up to the Asker (and I won't have any more to say on this), but just so you know:

    I, and most EE Experts, would rather get an "A" on a 100-pt question than a "B" on a 500-pt Q.

    As the grading guidelines indicate:
    If his answer is correct and complete, it deserves an "A".  When you think that an answer is less than complete, you should say so in a comment -- give the Expert a chance to improve upon his reponse.  If he does not, then a "B" may be justified.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
    In Easy String Encryption Using CryptoAPI in C++ ( I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
    This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

    755 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

    17 Experts available now in Live!

    Get 1:1 Help Now