Jump to content
  • Advertisement
Sign in to follow this  
MajinMusashi

Printing colored C++ source code

This topic is 4822 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Seems a strange and not appropriate question, but... Right now I figured out that I CAN'T print colored C++ source code on Visual C++ 6. During a Google session, I've found only a non-free tool that could solve my problem... Do you know how to do it, either using Visual C++ or another IDE? Thanks! PS.: Stupid question? Maybe. PS.: Sorry, not an English native.

Share this post


Link to post
Share on other sites
Advertisement
You can't print in colour from any of the Visual Studios sadly.

ace

Share this post


Link to post
Share on other sites
Quote:
Original post by ace_lovegrove
You can't print in colour from any of the Visual Studios sadly.
ace

Ace, is there nothing else that could do the job?

Share this post


Link to post
Share on other sites
I realize it's a bit lame, but it's how I did it for my classes.

I copied all the text (Ctrl-A in MSVC), and pasted into MS Word (works in OpenOffice too). It pastes w/ colour codes intact.

I only printed in B&W though, but considering it's colour in the Word document, it SHOULD print in colour too. I did it this way so I could modify the font size so I don't have 500 pages of code for a small app in C++...

Hopefully you can tell us (me?) whether this trick works or not.

[edit]
Judging from the reply below, it does work in 2002 (VC6). I used .NET, so it shouldn't be any different.

Share this post


Link to post
Share on other sites
This works in MSVS 2002, don't know about other versions: You can just select the code you wish to print, copy it to Wordpad/Word/[your word processor], and it will keep the formatting (ie, font, size, and colour) with it. You can then print it out from there.

Failing that, if it's only a small amount of code, you could go to a paste site (ie, http://www.rafb.net/paste/, paste your code there, and print it out in colour from your browser.

Also, Whole Tomato Software's Visual Assist allows you to print from MSVS in colour. Get the free trial version perhaps.

Hope this helps.

Share this post


Link to post
Share on other sites
Quote:
Original post by sordid
I realize it's a bit lame, but it's how I did it for my classes.
I copied all the text (Ctrl-A in MSVC), and pasted into MS Word (works in OpenOffice too). It pastes w/ colour codes intact.
...
Hopefully you can tell us (me?) whether this trick works or not.

No, if didn't :) Already tried that trick (MS Visual C++ 6 -> MS Word 2003)

Quote:
Judging from the reply below, it does work in 2002 (VC6). I used .NET, so it shouldn't be any different.

Sorry, Visual C++ 6 was shipped before 2002 (around 98).

Share this post


Link to post
Share on other sites
Quote:
Original post by mattd
Failing that, if it's only a small amount of code, you could go to a paste site (ie, http://www.rafb.net/paste/, paste your code there, and print it out in colour from your browser.

No, it's a huge amount of code :) Because that I don't want to spend my whole day frying my eyes reading code directly from my CRT monitor.

Quote:
Also, Whole Tomato Software's Visual Assist allows you to print from MSVS in colour. Get the free trial version perhaps.

Hehehehe, that is the "non-free tool that could solve my problem...". Thanks anyway!

PS.: Well, now I'm beginning to believe I'm not that stupid, but some IDE developers are ;)

Share this post


Link to post
Share on other sites
Well, it's an old IDE :P Probably didn't see a need for context-exact copying.

I just remembered that my buddy was using TextPad for his coding, and always came to class with colour printed source code from it.. TextPad does support C++'s keywords and such. (http://www.textpad.com/)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!