code pasting

Aug 14, 2015 at 12:00pm
Hello.
I wonder how different users post their code inside their questions and comments and answers. I can see the icon <> below the textbox but nothing happens if I click it. Please help.
Thank You.
Maurycy5
Aug 14, 2015 at 12:02pm
Ah. This button is broken in new topics.
It should work when editing topic or you can write tags manually:
[code][/code]
Aug 14, 2015 at 1:02pm
Thank you.

What should I type in between these two tags? should I just type in text and the website will turn it into colorful text etc. if it finds it looking like c++ code?
Aug 14, 2015 at 1:04pm
Yes.
[code]
#include <iostream>

int main
{
    std:cout << "Hello, World!" << std::endl;
}
[/code]
1
2
3
4
5
6
#include <iostream>

int main
{
    std:cout << "Hello, World!" << std::endl;
}
Topic archived. No new replies allowed.