Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void ReadCoordsFile(char *filename)
- {
- fstream ide_txt;
- ide_txt.open(filename, ios_base::in);
- if (ide_txt.is_open())
- {
- string s;
- while (getline(ide_txt, s))
- {
- if(atoi(s.c_str()))
- {
- for ( string::iterator it = s.begin(); it != s.end(); it++ )
- {
- if ( *it == ',' ) { *it = ' '; }
- }
- sscanf(s.c_str(), "%d %*s %*d %f %f %f", &CoronasArray[i].modelID, &CoronasArray[i].pos.x, &CoronasArray[i].pos.y, &CoronasArray[i].pos.z);
- i++;
- }
- }
- }
- ide_txt.close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement