Advertisement

Loading from text files.

Started by November 05, 2003 05:43 AM
3 comments, last by torturedfreak 21 years, 4 months ago
I''m trying to load my world from text files as in tutorial 10 on Nehe''s OpenGL page, I''m managing to load it all in using %d for integer''s %f for floats etc, however I''m having some trouble reading in strings from the files, does anyone know the appropriate control character? THANKS
You can use %s.
Advertisement
%s ?

Relative Games - My apps

thanks, so to convert whatever variable I read that to into a char* for fopen I''d just need to use char* f=var.c_str()??
Hello cippyboy,

%s ... is for string. For example printf() example of %s or %i

Full explanation is there.

- [BDS]StackOverflow


BlueDev Studios

[edited by - BlueDev on November 5, 2003 1:56:47 PM]
[/quote]

This topic is closed to new replies.

Advertisement