Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. std::ifstream config;
  2. config.open( std::string( GAME_DIR ) + "cfg/config.cfg", std::ifstream::in );
  3.  
  4. if ( config.is_open() )
  5. {
  6. std::string line;
  7. while ( !config.eof() )
  8. {
  9. std::getline( config, line );
  10. AMVector< std::string > tokens;
  11. std::istringstream ss( line );
  12. std::string token;
  13. while ( ss >> token )
  14. tokens.AddToTail( token );
  15.  
  16. for ( int32_t i = 0; i < tokens.Count(); i++ )
  17. printf( "%s\n", tokens[i].c_str() );
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement