Original Post
i am trying to retrieve a number from a text file (ASCII text) i need to convert the string to a float or int to use in a numerical function. problem is i get this ------------------------------------------------------------------------------ c:\coding\irrlicht\ice\ICE_3.0\ICE_3\src\Demo\GameStates\gs_DemoFakeGame.cpp(68) : error C2440: 'type cast' : cannot convert from 'char [100]' to 'irr::f32' There is no context in which this conversion is possible ------------------------------------------------------------------------------- irr::f32 is a typedef for float. i tried this.... ---------------------------------------------------------------------- irr::f32 PD_Entity_Loader::Get_X_Position() { ifstream Entity_Definition_File ( "Entity_List.txt" ); char Entity_Content_Holder[100]; getline(Entity_Definition_File, (string)Entity_Content_Holder, '\n'); return((irr::f32)Entity_Content_Holder); } --------------------------------------------------------------------- is there a way i can retrieve the value in the text and still get it as a float for my operation?