All Content
Blogs
Forums
News
Tutorials
Log In
Sign Up
Login
Username / Email
Password
Remember me
Forgot password?
Login
or
Don't have a GameDev.net account?
Sign up
Forgot your password?
Email Address
Reset Password
Please contact us if you have any trouble resetting your password.
Home
Blogs
Forums
News
Portfolios
Projects
Tutorials
15
users logged in
Proud partner of GDC 2025
New?
Learn about game development
.
Before posting, review our
community guidelines
.
Support GameDev.net with a monthly
GDNet+ subscription
!
Follow Us
Chat in the
GameDev.net Discord!
Back to General and Gameplay Programming
Advertisement
char* -> float
General and Gameplay Programming
Programming
Started by
gph-gw
August 26, 2001 02:51 AM
1
comment, last by
gph-gw
23 years, 5 months ago
gph-gw
Author
122
August 26, 2001 02:51 AM
Quick question: how do I convert "1.5" into 1.5f? atoi does it for ints but is there one for floats?
Cancel
Save
Facehat
696
August 26, 2001 03:03 AM
Indeed, float somenumber=atof(string); will do just that.
Cancel
Save
Advertisement
Colin Jeanne
1,115
August 26, 2001 03:12 AM
Yes. atof which returns a double.
Cancel
Save
This topic is closed to new replies.
Advertisement
Popular Topics
C++ pointers that are released upon going out of scope
General and Gameplay Programming
Another better idea than GTA (change my mind)
GDNet Lounge
computer malfunction in visual studio 1&0 != 0!!!
General and Gameplay Programming
click and drag sprite
For Beginners
How to Resolve This Normal Issue?
Graphics and GPU Programming
Returning an object on the stack in a variadic function causes a crash
AngelCode
Advertisement
Recommended Tutorials
Chess Programming Part II: Data Structures
Artificial Intelligence
Intersection Math & Algorithms - Learn to Derive
Math and Physics
The Cost of Insecurity - Griefing: from Anonymity to Accountability
General and Gameplay Programming
Image Recognition in Mobile Game Testing
General and Gameplay Programming
Using Linked Lists to Represent Game Objects
General and Gameplay Programming
Advertisement
Reticulating splines
About GameDev.net
Community Guidelines
Terms of Service
Privacy Policy
Contact Us
Copyright (c) 1999-2025 GameDev.net, LLC
Back to Top