help with code snippets

I see posts with snippets of code inserted into the post. How do I do that so I can give examples of what I'm talking about?

tex
The code tags can be applied to any amount of text in the post, even if it's one word, like say I'm talking about keyword this

Or maybe I have an entire program that I have problems with, like

1
2
3
4
5
6
7
8
9
10
#include<string>
#include<iostream>

using namespace std;

int main( void )
{
    cout << "Hello world" << endl;
    return 0;
}
Last edited on
You put the code inside code tags.

1
2
3
[code]
Your code here
[/code]


You can use the <> button on the right side of the textbox to generate them automatically.
See this article for information on how to use code tags.
http://www.cplusplus.com/articles/jEywvCM9/

Topic archived. No new replies allowed.