473,386 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How Do You Add Colored Code in the Forums

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
Mar 6 '08 #1
6 2166
sanctus
84
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
Instead of typing only "code" in brackets at the beginning of your code you type "code=c"... for example
Expand|Select|Wrap|Line Numbers
  1. int i=0;
  2. for i= 0 ; i<4; i++
  3. {
  4. std::cout<<'this should have no colors'<<endl;
  5. }
  6.  
Expand|Select|Wrap|Line Numbers
  1. int i=0;
  2. for (i= 0 ; i<4; i++)
  3. {
  4. std::cout<<'this should have colors'<<endl;
  5. }
  6.  
In case quote it and you see it...
Mar 6 '08 #2
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??? - CTYD
Mar 6 '08 #3
jabbah
63
just click on the "reply" at the end of sanctus' message. you will get a text box with a quote of sanctus' message. then you will see.

besides you can as well do code=cpp.
Mar 6 '08 #4
Ganon11
3,652 Expert 2GB
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.
Mar 6 '08 #5
Expand|Select|Wrap|Line Numbers
  1. #include <iosteam.h>
  2.  
  3.  
  4. int main()
  5. {
  6.   cout << "Testing Color for Code" << endl;
  7.   return 0;
  8. }
  9.  
Expand|Select|Wrap|Line Numbers
  1.  cout << "Testing Color for Code" << endl;
Testing - CTYD
Mar 6 '08 #6
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! - CTYD
Mar 6 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: ashkaan57 | last post by:
Hi, I was trying to display a small colored square using <table> tag. It worked fine on the screen but when I do print preview, the square shows up as white. I used both: <table width="15"...
0
by: lazaridis_com | last post by:
Colored Code Blocks Pudge generated documentation can contain colored code blocks, using the rst directive "..code-block:: Python" (an other languages supported by SilverCity). ...
0
by: lazaridis_com | last post by:
Colored Code Blocks Pudge generated documentation can contain colored code blocks, using the rst directive "..code-block:: Python" (an other languages supported by SilverCity). ...
2
by: khacthuy | last post by:
I need to write a program with content: Colored plane graphs. Tell people what I know. I always code for the study. Thanks please send me mail: khacthuy.3k@gmail.com I come from VietNamese...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.