Click to See Complete Forum and Search --> : Conversion of a long!


MrSkywalker
April 26th, 2005, 11:24 PM
How can I convert a long to a string that represents the number in th IEEE language.


Thanks alot in advanced.

Regards,

Doorsdown
April 26th, 2005, 11:43 PM
can't you just do

string var;
long x=100;
var ="x";

Ejaz
April 27th, 2005, 01:57 AM
Strings: How to convert a numeric type to a string? (http://www.codeguru.com/forum/showthread.php?s=&threadid=231056)
Strings: How to convert a string into a numeric type? (http://www.codeguru.com/forum/showthread.php?s=&threadid=231054)

cilu
April 27th, 2005, 02:51 AM
can't you just do

string var;
long x=100;
var ="x";
Where did you get that? :eek: You would end up with a string that holds "x" not "100".

rdrast
April 27th, 2005, 04:37 AM
What is the IEEE Language?

There are IEEE defined standard representation for floating point numbers, but not longs.

cilu
April 27th, 2005, 08:06 AM
What is the IEEE Language?
He probably meant IEEE standard, not language... ;)

MrSkywalker
April 27th, 2005, 09:12 AM
Exactly...!!!

It's not a language, I ment a standar for The Institute of Electrical and Electronics Engineers.

By the way in VB I use this dll, QPRO32.DLL. However, I thik there should be a way to do this in c++ with out using this dll.


Regards,

RoboTact
April 27th, 2005, 09:37 AM
By the way in VB I use this dll, QPRO32.DLL. However, I thik there should be a way to do this in c++ with out using this dll. :eek:

Did you read FAQs suggested by Ejaz?

Bob Davis
April 27th, 2005, 10:32 AM
Exactly...!!!

It's not a language, I ment a standar for The Institute of Electrical and Electronics Engineers.

By the way in VB I use this dll, QPRO32.DLL. However, I thik there should be a way to do this in c++ with out using this dll.


Regards,

What they're trying to say is that there isn't a standard IEEE format for displaying a long integer. You might be confused with IEEE floating-point format, which defines how a floating-point quantity is stored as binary data.

MrSkywalker
April 27th, 2005, 02:22 PM
Exactly!

Do you have something that could help me out?

Thanks a lot.


Regards,

rdrast
April 27th, 2005, 05:45 PM
I'm still confused as to what you are looking for, but if you just want the representation of floating point, see here:

http://www.psc.edu/general/software/packages/ieee/ieee.html

Bob Davis
April 28th, 2005, 05:29 AM
Exactly!

Do you have something that could help me out?

Thanks a lot.


Regards,

No, we don't. You said that you wanted to know how to print an unsigned long in standard IEEE format. This format does not exist. What do you need then?