Message formatting

I was wondering how you arrange the formatting tags so that you can have source-code adjacent to program output in a message on this forum. For an example see the 2nd message in the following thread:
Last edited on

[code]int main() {
std::cout<<"Hello World!"<<std::endl;
return 0;
Hello World!

int main() {
    std::cout<<"Hello World!"<<std::endl;
    return 0;
Hello World!
I've seen that several times too, but I've never thought about it until you asked that. I thought it was dependant on how long your code and output is, but I doubt that is right. I'm not sure how to do that myself, but can see the benefits of doing that so you can see the code and output at the same time rather than scrolling down the page.
Thanks @Danny Toledo
I really do need to sit down and read some of the articles. That is one part of this site I've not really touched. Thanks for clarifying that Danny Toledo.
why is BHX Specter's post reported?
Troll...and I know who, the troll from the jobs thread. He is the only person I've made mad enough to do it, but he doesn't realize the more he does it the quicker he will be banned because my posts are on topic and nothing wrong with them.
i saw at many threads , your posts were reported.... for almost nothing
Topic archived. No new replies allowed.