Opening files in VC++...

Started by
0 comments, last by BlackScar 24 years, 1 month ago
Hi! I''m trying to load a data file into my 3D engine for the map, but I can''t find any pages on how to open a file to do it. I got it, right now, to open a file & write to it (even though I never will write to it). Then display the data in it. For the map though, I need 3 variables (XYZ) for each vertex. How can I break one chunk of data into several pieces? I know in vb it automatically does it through "0","0", or you can use split and split the data depending on a thing you put in it. Anyhow, how can I do this through VC++? I was wanting the structure to look something like this: Strip1="0,0,0""0,0,0""0,0,0" and so on Strip2=and so on and so on Can anyone help me? Thanks! Justin Eslinger
~-=-=-=-=-=-=~~Justin Eslinger~~.."BlackScar"..~~-=-=-=-=-=-=~
Advertisement

Check out ifstream/ofstream in your compilers documentation.

Check out strtok for help on parsing each line of the file.

-mordell
__________________________________________

Yeah, sure... we are laughing WITH you ...

This topic is closed to new replies.

Advertisement