GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 01-Oct-2006, 12:30
suvirj suvirj is offline
New Member
 
Join Date: Jul 2006
Posts: 8
suvirj is on a distinguished road
Angry

ASCII art display prob.


Hey,

I wanted to insert some ASCII art in some program which i am working on. But there is some problem when i try to display a " \ ".If i type "\", it doesnt display anything and If i type " \\ ", then it displays one slash. This is really irritating. Is there any way to get just one back-slash without typing it multiple times

I use Borland turbo C++ 4.5 .

Thanx
  #2  
Old 01-Oct-2006, 14:46
ubergeek ubergeek is offline
Regular Member
 
Join Date: Jan 2005
Posts: 775
ubergeek is a jewel in the roughubergeek is a jewel in the roughubergeek is a jewel in the rough

Re: ASCII art display prob.


Quote:
Originally Posted by Countless Microsoft articles
This behavior is by design.
No, really, it is. Anything that starts with \ (i.e. \n, \a, etc) is an "escape sequence" that encodes something that can't be expresed with a character, such as \n for a line break or \a for a beep. But, sometimes \ needs to appear. Therefore, in C/C++ (and a bunch of other languages) \\ means \.
  #3  
Old 01-Oct-2006, 17:17
davekw7x davekw7x is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Left Coast, USA
Posts: 4,720
davekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to behold

Re: ASCII art display prob.


Quote:
Originally Posted by suvirj
Hey,

I wanted to insert some ASCII art in some program which i am working on. But there is some problem when i try to display a " \ ".If i type "\", it doesnt display anything and If i type " \\ ", then it displays one slash. This is really irritating. Is there any way to get just one back-slash without typing it multiple times

I use Borland turbo C++ 4.5 .

Thanx

You could write a simple program that takes lines of ascii chars from a file converts single backslashes to doubles for your C code. (What are you putting into your program? string literals containg the ascii sequences or what?)

The file of ascii chars would be created by some artist (using a text editor, for example) or by some program that scans bit map files (or other graphics files) and spits out lines of ascii chars.

Show us a couple of lines of ascii art and tell us how you would like to use them in your program. Then maybe we can be a little more specific about possible solutions.


Regards,

Dave
 
 

Recent GIDBlogDeveloping GUIs with wxPython (Part 4) by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I read a *.txt file from disk and display the values as bars in TChart Unit1 C++ Forum 9 07-Sep-2006 15:12
Hw to choose certain field in mysql input by user in visual C++/MFC and display in CR bryan523 C++ Forum 6 25-Sep-2005 19:19
fedora display problem machinated Computer Software Forum - Linux 1 22-Aug-2005 21:03
problems with a text display in a tab maveganzones FLTK Forum 2 23-Mar-2005 02:26
Problem with int mixed with char,... leitz C++ Forum 17 07-Dec-2004 20:56

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 20:21.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.