ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i understood your question, the fact is it doesnt make sense, c++ deals in plain text or binary, you would have to use an external graphics library to make it output anything like that.
if you can give me a clue as to what you want like "i want to input plain text and ouput html/TeX with the first letter of each word bolded" or "i want to open up a window that displays the contents of a text file with the first letter of each word in bold" then maybe i can help but just asking "how to bold the first letter of each word" makes no sense in this context.
this program prints the line in white..emboldened...
hope this has been of some help...
here are some color codes you might like to use:
black 0;30
green 0;32
red 0;31
brown 0;33
dark grey 1;31
light green 1;32
light red 1;31
yellow 1;33
blue 0;34
cyan 0;36
purple 0;35
light gray 0;37
light blue 1;34
light cyan 1;36
light purple 1;35
white 1;37
It would be much better to implement this program using ncurses than escape sequences that may or may work with the given terminal. I will post a sample program when i get home.
yeah..agreed it would not work...atleast i dont think it would on VT100, but other than that ..it is working on the terminal that i use...ncurses doesnt sound like a great idea for such a small thing...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.