Code::Blocks Forums

User forums => Help => Topic started by: christruk42 on March 16, 2021, 06:54:13 PM

Title: How do you post a block of code
Post by: christruk42 on March 16, 2021, 06:54:13 PM
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
Title: Re: How do you post a block of code
Post by: Suryavarman on March 16, 2021, 07:42:41 PM

#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;
}


Title: Re: How do you post a block of code
Post by: Miguel Gimenez on March 16, 2021, 07:44:37 PM
You can use the button with a # over the emoticons or (code)Use square brackets instead of brackets(/code)