|
Thread: £
-
Oct 7th, 2002, 01:26 PM
#1
Thread Starter
New Member
£
Bit of a lame question, but here goes anyway:
How do i display a £ sign on screen in c++. The below line displays it as a ù. I've tryed it on 2 different computers and 2 different compilers and i have checked that all the regonal options are fine.
cout<<"The total wages are £"<<Wages;
Thanks for any assistance
-
Oct 7th, 2002, 01:49 PM
#2
Monday Morning Lunatic
Uh. Works for me. What OS / terminals did you try? Worked in GNU/Linux with GCC for me, under xvt.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Oct 7th, 2002, 01:59 PM
#3
Thread Starter
New Member
I'm not a linux person, so i don't know what terminals, GNU, GCC or xvt is but these r the systems and compilers i have tryed:
I first tryed it on 2000 professional running MS VC++ 6 (profesional i think). I then tryed it on XP prof running MSVC++ 6 enterprise, and finally on a different xp professional under Dev C++ 4. All with the same error.
-
Oct 7th, 2002, 02:08 PM
#4
Monday Morning Lunatic
Linux - an OS kernel.
GNU - GNU's Not Unix. A free unix clone.
GNU/Linux - the GNU system with the Linux kernel. What most people know as "Linux".
GCC - GNU Compiler Collection
xvt - an X-Windows terminal program
I know it worked on Windows 2000 for me before with VC++ 7 (and all the proper British region settings, etc.).
Bizarre :-/
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Oct 7th, 2002, 03:07 PM
#5
Frenzied Member
Dumb question - the font you are using ACTUALLY has the 'pound' character?
-
Oct 7th, 2002, 03:51 PM
#6
Thread Starter
New Member
dunno, its just a console app, i dont know how to set the font, atm i think it ariel.
-
Oct 7th, 2002, 04:10 PM
#7
Under Windows the fond used in console applications depends on the size of the window. You could try resizing it...
... ASCII 165 seems to be the pound sign at any size ...
-
Oct 7th, 2002, 04:10 PM
#8
Frenzied Member
For Fixedsys, the character code for the pound is 0xA3, might want to try just that...
::shrug::
Z.
-
Oct 7th, 2002, 04:19 PM
#9
Hyperactive Member
When i run the code: cout<< "£"; i get a "u" with an accent. I don't think '£' is a dos character.
-
Oct 7th, 2002, 05:52 PM
#10
Frenzied Member
Try:
Code:
cout << char(0xa3) << endl;
Z.
-
Oct 8th, 2002, 02:29 AM
#11
Thread Starter
New Member
I tryed changing the font for the window, and there are only 2, both of which give the same result. I also tryed typing in a £ in one of the input screens and it worked (showed on screen as a £).
Try:
code:--------------------------------------------------------------------------------
cout << char(0xa3) << endl;
--------------------------------------------------------------------------------
Z.
Tryed that too, still a ù.
Nevermind, its a smal problem, and at least i finally know what all those linux accronims mean
-
Oct 8th, 2002, 08:28 AM
#12
Actually the only thing realted to Linux is Linux itself, which is not really an acronym but a combination of Linus and Unix (Linus Torvald's Unix).
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|