Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
C++ Programming General discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C++ Programming section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old June 3rd, 2007, 11:24 AM
Registered User
 
Join Date: May 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Converting Int -> ASCII

Hi!
How can i convert an Int value to its own ASCII symbol?

for example i have:

int i=33;

and now i need to transform i into ASCii symbol;

Help
Thx





Reply With Quote
  #2 (permalink)  
Old June 5th, 2007, 01:12 AM
Registered User
 
Join Date: Apr 2007
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

there's nothing special all u have to do is to typecast the int data type into char data type
int i = 33;
cout<<char(i);
The above statement would do the trick for you.

Reply With Quote




Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting int to byte yukijocelyn C# 2005 1 May 30th, 2008 03:44 AM
Error converting data type varchar to int. - SQL baysaa SQL Server ASP 1 March 16th, 2008 11:56 PM
Converting a set of string to its ascii value... rittwick Beginning VB 6 4 April 2nd, 2007 10:46 AM
Converting an ASCII character to binary? skyraider Visual Basic 2005 Basics 0 May 7th, 2006 08:20 PM
Converting int to string Judex C++ Programming 3 March 1st, 2004 10:44 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.