I click the Code button and it erases all the code I typed and won't let me type in the box any more.

I am getting realy annoyed trying to post c code because I can't add the curly brace... can someone please tell me what it takes to post code and don't tell me click the </> Code button... IT is not working for me.

just type it out. Put a blank line before the code, make sure all of the code lines are indented with 4 spaces.

# I did not use the </>Code button.
print('Hello World.')

You can also use the tilde character (`) to do "inline code" such as this: int c = 5; ...for when you don't need a whole block.

OK thanks, this is a test post. It worked
Thanks!

for (int i=0;i<4;i++){
    do something with i;
}

The reply editor also has helpful buttons that will do this for you.

  1. Select your text and click either the Code or Inline Code button to apply formatting.

  2. Click the Code button to open an editor popup where you can paste your code. Submitting that will insert into the post a formatted code block with the contents.

  3. click the Inline Code button and a sample formatted section will be inserted into the post.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.