Need help? Check out our Support site, then


Problem posting C++ code

  1. gracianotorrao
    Member

    Hi
    I'm using this to post C++ code:
    [sourcecode language='cpp'] cout << "Hello"[/sourcecode]

    If i save the post the characters '<<' are replaced by '<<'

    Why is that?

    Thanks

    The blog I need help with is gracianotorrao.wordpress.com.

  2. gracianotorrao
    Member

    Noticed that they show exactly the same in the text above!

  3. gracianotorrao
    Member

    Humm ... even stranger than i thought.
    I start typing some text and then use the pluging for the code i want to post.
    [sourcecode language='cpp']
    #include<iostream>
    int main(){
    std::cout << "Hello";
    }
    [/sourcecode]

    Then, when i "save draft" e have to change from visual to HTML and back to visual to make it look ok?!

  4. I would contact staff directly on this. I suspect they need to do some massaging of the code on the backend.

    http://support.wordpress.com/contact/

  5. gracianotorrao
    Member

    Thanks for the sugestion.
    I will do some more tests just to make sure.

  6. You're welcome.

  7. gracianotorrao
    Member

    Here is the problem solution:
    Don't use VISUAL mode for this.
    Use HTML mode :)

  8. In theory you can use the shortcodes in the visual editor and wordpress should take care of it, but using shortcodes in visual mode is not a consistent thing. Thanks for posting that as it had not occurred to me that that could be the issue.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.