What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 150 Stack Exchange communities.

I many times tried that four space(bar)s before and after the code. But I never succeed. Can one say how to put the code in the comments.

share|improve this question

migrated from stackoverflow.com Jun 4 '10 at 2:51

This question came from our site for professional and enthusiast programmers.

Here I am typing the code with spacebars. And see how it prints #include<iostream> – prabhakaran Jun 4 '10 at 2:47
Use backticks, just like you do in the post body. – James McNellis Jun 4 '10 at 2:48
This is in backticks to test James's theory This is not in backticks – Oddthinking Jun 4 '10 at 3:01
possible duplicate of How does the comment system and comments work? – Jon Seigel Jun 4 '10 at 3:11

1 Answer 1

up vote 0 down vote accepted

Within comments you can use backticks (`) which on most keyboards is on the same key as the tilde (~)

you can use this in both posts and comments by wrapping the code section in backticks.

share|improve this answer
@devinb thank you it works – prabhakaran Jun 5 '10 at 16:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .