User forums > Help
How do you post a block of code
(1/1)
christruk42:
Downvote this;
I can't seem to do it, I'm using 'new reddit' so the four spaces format dosent work. I've heard you need to use 3 backticks. I tried doing it like this:
```
console.log('hi')
```
to no avail
Suryavarman:
--- Code: ---#include <iostream>
#include <string>
int main()
{
std::cout << "you can use the BBCode." << std::endl;
std::cout << '[' << "CODE" << ']' << std::endl;
std::cout << '[' << "\CODE" << ']' << std::endl;
return 0;
}
--- End code ---
Miguel Gimenez:
You can use the button with a # over the emoticons or (code)Use square brackets instead of brackets(/code)
Navigation
[0] Message Index
Go to full version