Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. string srow;
  2. string scolumn;
  3. int row = 0;
  4. int column = 0;
  5. string gametype;
  6. ifstream myReadFile;
  7. myReadFile.open("text.txt");
  8.  
  9. if (myReadFile.is_open())
  10. {
  11. getline(myReadFile, gametype);
  12. getline(myReadFile, srow);
  13. getline(myReadFile, scolumn);
  14.  
  15. row = stoi(srow);
  16. column = stoi(scolumn);
  17.  
  18. for (i = 0; i <row; i++)
  19. {
  20. for (j = 0; j <column; j++)
  21. {
  22. myReadFile.get(ch);
  23. printf("%c",ch);
  24.  
  25. }
  26. }
  27.  
  28. }
  29. myReadFile.close();
  30.  
  31.  
  32. return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement