Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 22nd, 2004, 4:11 PM   #1
Ade
Hobbyist Programmer
 
Ade's Avatar
 
Join Date: Oct 2004
Location: England, UK
Posts: 139
Rep Power: 0 Ade is an unknown quantity at this point
Hey guys, a simple question but i can't seem to find the answer on the net.

The question is how can I get the '£' character. Whenever I type it it comes out as a U with a squiggle on it. I think it's probally a special character but I'm not sure how to get the £ out.

thanks in advance
Ade
__________________
Don't wound what you can't kill
Ade is offline   Reply With Quote
Old Nov 22nd, 2004, 5:57 PM   #2
lostcauz
Hobbyist Programmer
 
Join Date: Nov 2004
Location: 1691 miles East of L.A.
Posts: 159
Rep Power: 4 lostcauz is on a distinguished road
£ is displayed by holding alt then typing 156...alt-156. I reckon this is what you wanted?
__________________
-- lostcauz

Stepped in what?...
Behind whose barn?...
I didn't even know they had a cow!
lostcauz is offline   Reply With Quote
Old Nov 22nd, 2004, 7:31 PM   #3
Sudhakar
Newbie
 
Sudhakar's Avatar
 
Join Date: Nov 2004
Location: India
Posts: 2
Rep Power: 0 Sudhakar is on a distinguished road
Send a message via MSN to Sudhakar
Hey plz clearly state ur problem do u want to print on console or jst want it in ur program.
__________________
.::sudhakar::.
other forums i contribute to
Free Gmail Invitation
Sudhakar is offline   Reply With Quote
Old Nov 22nd, 2004, 9:50 PM   #4
kurifu
Expert Programmer
 
kurifu's Avatar
 
Join Date: Jul 2004
Location: Halifax, Nova Scotia (Canada)
Posts: 784
Rep Power: 5 kurifu is on a distinguished road
Send a message via ICQ to kurifu Send a message via MSN to kurifu
If you are using a console to output the text you need to find a way to translate all your output to the proper codepage which your console is using, this is an indepth process and I am not willing to explain it here.

A better alternative would be to learn to create and compile your code to work with UNICODE based input and output, there are many articles on the interweb about this, actually I once was writing a book on the topic, but lack the time to complete it.

When you look at UNICODE, if you have question about how things are done, feel free to ask and I can probably help you out in a little more detail.

Good luck with your project.
__________________
Clifford Matthew Roche <geek@cliffordroche.com>
Web Hosting: http://www.crd-hosting.com
Consulting: http://www.crdev-consulting.com
kurifu is offline   Reply With Quote
Old Nov 23rd, 2004, 2:04 AM   #5
bl00dninja
Programming Guru
 
bl00dninja's Avatar
 
Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5 bl00dninja is on a distinguished road
as far as console output, this works, don't know if that's what you want though...

#include <stdio.h>

int main()
{
	printf("%c", 156);
	return 0;
}

note: in C.

:ph34r:
__________________
i put on my robe and wizard hat...

Have you ever heard of Plato, Aristotle, Socrates?...Morons.
bl00dninja is offline   Reply With Quote
Old Nov 23rd, 2004, 2:10 AM   #6
bl00dninja
Programming Guru
 
bl00dninja's Avatar
 
Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5 bl00dninja is on a distinguished road
oh sorry, for C++

#include <iostream>
using namespace std;

int main()
{
	cout<<(char) 156;
	return 0;
}
use a typecast to convert a character into it's ASCII integer value

:ph34r:
__________________
i put on my robe and wizard hat...

Have you ever heard of Plato, Aristotle, Socrates?...Morons.
bl00dninja is offline   Reply With Quote
Old Nov 23rd, 2004, 4:21 AM   #7
Ade
Hobbyist Programmer
 
Ade's Avatar
 
Join Date: Oct 2004
Location: England, UK
Posts: 139
Rep Power: 0 Ade is an unknown quantity at this point
That's wicked mate thanks.
__________________
Don't wound what you can't kill
Ade is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:11 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC