473,465 Members | 1,896 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

changing datatypes

can a signed 'int', 'long' or 'double' datatype be changed int 'char'
without using any standard library functions...

sudip
Jul 19 '05 #1
3 1675

"sudip chatterjee" <mo************@hotmail.com> wrote in message
news:82**************************@posting.google.c om...
can a signed 'int', 'long' or 'double' datatype be changed int 'char'
without using any standard library functions...

sudip


Sure

int i = 1;
int l = 2;
double d = 3;
char c1 = i;
char c2 = l;
char c3 = d;

is that what you meant?

john
Jul 19 '05 #2
>
int i = 1;
int l = 2;


I meant to type

long l = 2;

john
Jul 19 '05 #3
On 23 Jul 2003 10:19:44 -0700, mo************@hotmail.com (sudip
chatterjee) wrote:
can a signed 'int', 'long' or 'double' datatype be changed int 'char'
without using any standard library functions...

sudip


Sure, but you will have to use some function to do basically what
itoa() and sprintf() do. You might even have write that function
yourself. There is nothing magic in any of the standard library
functions, just code.

BTW - I am assuming you are trying to get a number formatted as a
string, as accomplished like this: sprintf( psz, "%i",
nNumberToFormat);

</dib>

John Dibling
email: dib@substitute_my_full_last_name_here.com
Witty banter omitted for your protection
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: John Bentley | last post by:
John Bentley: INTRO The phrase "decimal number" within a programming context is ambiguous. It could refer to the decimal datatype or the related but separate concept of a generic decimal number....
1
by: Jan Agermose | last post by:
Im writing information into an existing excel document using a connection string like: strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Filename + ";Extended Properties=\"Excel...
13
by: Peter | last post by:
Can anyone tell me how to change the data type of a field in a table created with a make table query? The field is a binary and must be changed to text. alternately does anyone know how to specify...
3
by: Mark | last post by:
What are the best .NET datatypes to handle SQL Server's Float and Real datatypes? I'd like to avoid using the SQL Server specific datatypes like SqlInt32 or similar. Thanks in advance. -Mark
9
by: Mark Rae | last post by:
Hi, I posted a couple of days ago about the possibility of "simulating" in ..NET1.1 the nullable datatypes available in .NET2.0 - I'm nearly there, but require a bit more guidance. Basically,...
2
by: Mark Gibson | last post by:
Hello, I've been experimenting with dblink recently, and have encountered some limitations I'd like to discuss. I've been trying to create views of remote tables, like so: CREATE VIEW stuff...
2
by: Greg Wickham | last post by:
Hi All, Earlier this year there was a discussion between Tom and Ezra regarding extending 'set session authorization' to facilitate changing the identity of a connection. A synopsis of the...
2
by: circuit_breaker | last post by:
Hi, Is there's a built-in object inside of mySQL that hold its various datatypes? As an example, I'd like to populate an array with the following values: "BOOL",...
5
by: michal | last post by:
hi guys, i thought you might be interested in a nice JSON class which converts ASP datatypes (basic datatypes, dictionaries, recordsets, ...) into JSON so that javascript can easily understand it...
6
by: Jeff | last post by:
Dear experts! ..NET 2.0 I'm trying to make an array containg multiple datatypes. This array will consist of 3 items (string, string, integer): my first try was this, (of course it fails)...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.