Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.47 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <fstream>
  4. using namespace std;
  5.  
  6. struct zestaw{
  7.     int integ;
  8.     string s;
  9.     string ch;
  10.     bool b1, b2, b3, b4;
  11.     unsigned int uc1, uc2, uc3, uc4;
  12.     float f1, f2, f3, f4;
  13. };
  14.  
  15. void SortCount(string plik, string pl1, string pl2){
  16.  
  17. }
  18.  
  19.  
  20. //void SortInt(string plik, string pl1, string pl2){
  21. //  fstream input;
  22. //  input.open(plik, fstream::in);
  23. //}
  24.  
  25. void SortString(string plik, string pl1, string pl2){
  26.  
  27. }
  28.  
  29. void SymmetricDifference(string plik, string pl1, string pl2){
  30.  
  31. }
  32.  
  33.  
  34. int main(){
  35.     fstream Plik;
  36. //  fstream pp1;
  37. //  fstream pp2;
  38. string plik = "in.txt";
  39.     Plik.open("in.txt", fstream::in | fstream::out);
  40. //  pp1.open(pl1.s_str(), fstream::in | fstream::out);
  41. //  pp2.open(pl2.s_str(), fstream::in | fstream::out);
  42.  
  43.     zestaw dane;
  44. //  while(!Plik.eof()){
  45.         Plik >> dane.integ;
  46.  
  47.         Plik.seekp(1, fstream::cur);
  48.     //  Plik >> dane.s;
  49.         getline(Plik, dane.s);
  50.         getline(Plik, dane.ch);
  51. //      Plik >> dane.ch;
  52.         Plik >> dane.b1 >> dane.uc1 >> dane.f1;
  53.         Plik >> dane.b2 >> dane.uc2 >> dane.f2;
  54.         Plik >> dane.b3 >> dane.uc3 >> dane.f3;
  55.         Plik >> dane.b4 >> dane.uc4 >> dane.f4;
  56.  
  57. //  }
  58.     cout << dane.integ << endl;
  59.     cout << dane.s <<endl;
  60.     cout << dane.ch<< endl;
  61.     cout << dane.b1 << " "<< dane.uc1 << " "<< dane.f1 << endl;
  62.     cout << dane.b2 << " "<< dane.uc2<< " " << dane.f2<< endl;
  63.     cout << dane.b3<< " " << dane.uc3<< " " << dane.f3<< endl;
  64.     cout << dane.b4 << " "<< dane.uc4 << " "<< dane.f4<< endl;
  65.  
  66.     Plik.close();
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement