Guest User

Untitled

a guest
Jun 19th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.88 KB | None | 0 0
  1.  
  2. unsigned int VYTAH_2::NajblizsiePoschodieVsmere(){
  3.     set<unsigned int>::iterator iter;
  4.     int s, pos;
  5.     s = UrciSmer();
  6.     cout << s << " " << AktualnePoschodie << " ";
  7.     if(s == -1 ){
  8.         for(iter = ZoznamPoschodi.begin(); iter != ZoznamPoschodi.end(); iter++){
  9.             if(*iter < AktualnePoschodie){
  10.                 pos = *iter;
  11.             }
  12.  
  13.         }
  14.     return pos;
  15.    }
  16.     if(s == 1 ){
  17.         for(iter = ZoznamPoschodi.begin(); iter != ZoznamPoschodi.end(); iter++){
  18.             if(*iter > AktualnePoschodie){
  19.                 cout << pos << "aaaa";
  20.                 return *iter;
  21.             }
  22.         }
  23.   }
  24.   return -1;
  25. }
  26.  
  27. void VYTAH_2::Chod(){
  28.     if (ZoznamPoschodi.empty()) {
  29.         PoslednaJazda = "";
  30.     } else if (MaximalnaObsadenost < Obsadenost) {
  31.         PoslednaJazda = "Pretazenie";
  32.     } else {
  33.         Smer = UrciSmer();
  34.         int najPos = NajblizsiePoschodieVsmere();
  35.         PoslednaJazda = ChodAVypis(najPos);
  36.         OtvorDvere(najPos);
  37.         VymazNavstivenePoschodie(najPos);
  38.  
  39.     }
  40. }
Add Comment
Please, Sign In to add comment