I was wondering how some people have colored code and others do not. How do I get the colored code to show up in the forum? I think you can read it better. I was just curious so I can do it in the future. - SEOT
How Do You Add Colored Code in the Forums
Collapse
X
-
Tags: None
-
Originally posted by CodeTilYaDropI was wondering how some people have colored code and others do not. How do I get the colored code to show up in the forum? I think you can read it better. I was just curious so I can do it in the future. - SEOT
Code:int i=0; for i= 0 ; i<4; i++ { std::cout<<'this should have no colors'<<endl; }
int i=0;
for (i= 0 ; i<4; i++)
{
std::cout<<'thi s should have colors'<<endl;
}
[/code]
In case quote it and you see it... -
I am not sure I understand. What you mean by typing "code=c"? Where do you type that at? Do you type "code=c" in the text box right before you type or copy your code in the text box??? - CTYDComment
-
If you are typing code in your response, we ask that you surround them with tags like this: [CODE]
This produces the plain, black and white formatting you see. It is standard and can be used for any language. However, there is the possibility to get colored, formatted output specially for your language, such as C, C++, Java, etc. etc. In this case, you would manually go to the [CODE] tag and replace it with: [CODE=c], or [CODE=cpp], or [CODE=java], etc. etc.
See also this section of our FAQ.Comment
-
[code=c]
#include <iosteam.h>
int main()
{
cout << "Testing Color for Code" << endl;
return 0;
}
[/code]
Code:cout << "Testing Color for Code" << endl;
Comment
-
Got It You All! I appreciate your help like always! This will help me make my code a little easier to read next time I post! - CTYDComment
Comment