Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. string INI::OpenFile( string strFile )
  2. {
  3. fstream myfile;
  4.  
  5. string strtemp;
  6. string strfile;
  7.  
  8. wstring wstrFile = wstring( strFile.begin(), strFile.end() );
  9.  
  10. const wchar_t * strfiletemp = wstrFile.c_str();
  11.  
  12. myfile.open( strfiletemp, ios::in );
  13.  
  14. if ( myfile.is_open() )
  15. {
  16. while( !myfile.eof() )
  17. {
  18. myfile >> strtemp;
  19.  
  20. cout << strtemp;
  21.  
  22. strfile += strtemp + '\r';
  23. }
  24.  
  25. myfile.close();
  26. }
  27.  
  28. return strfile;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement