Type casting

C

Curtis Gilchrist

I have a float value that I need to type cast into either a string or a
c-style string for painting in a window. I have racked my brain and
searched high and low for this and just cannot seem to find anything that
will work. I tried the reinterpret_cast, and it actually compiled but I got
a bunch of garbage. Can anyone shed light on this subject? Thanks in
advance...


-- Curtis
 
S

Sumit Rajan

Curtis said:
I have a float value that I need to type cast into either a string or a
c-style string for painting in a window. I have racked my brain and
searched high and low for this and just cannot seem to find anything that
will work. I tried the reinterpret_cast, and it actually compiled but I got
a bunch of garbage. Can anyone shed light on this subject? Thanks in
advance...


Read this:
http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.1

Regards,
Sumit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Type-punning / casting problem 20
Problem type-casting to a derived class 9
Type casting 3
Java type-casting -- Q3 50
type casting / conversion again 10
Casting 9
inheritance and casting 1
casting (void *) to (class *) 30

Members online

No members online now.

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,666
Latest member
selsetu

Latest Threads

Top