Skip to main content
gamedev.net
🔒 Locked

Integer Conversion

Started by Tooko Jan 30, 2004 at 4:06 AM 1 replies 350+ views
Original Post
Tooko
Tooko
Say I create my own integer, simil to a string. I overload all the operators and add the functions I want, but how can I make it so it converts into other string types? (eg char*) For example: int this = (int)some_float; Converts the some_float (value) to an int. How can I program this? I saw it once but I cant find it again.
Why do Suicide Bombers think they''re going to a better place? Don''t they know their going all over the place?
the future is just like the past, just later. - TANSTAAFL
emilk
emilk
operator int() const { return something; }
Tooko
Tooko
Thank you



Why do Suicide Bombers think they''re going to a better place?
Don''t they know their going all over the place?
the future is just like the past, just later. - TANSTAAFL

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.