Advertisement
dllbridge

Untitled

Apr 21st, 2025
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.76 KB | None | 0 0
  1.  
  2.  
  3. #include  <iostream>
  4. #include     <queue>
  5.  
  6. using namespace std;
  7.  
  8.  
  9.  
  10.  
  11. /////////////////////////////////////////////////////
  12. int main()
  13. {
  14.    
  15.     queue<string> q_s;
  16.    
  17.    
  18.     q_s.push(    "SONY");
  19.     q_s.push("Pictures");    
  20.    
  21.     cout << "q_s.size() = " << q_s.size() << endl;
  22.    
  23. }
  24.  
  25.  
  26.  
  27.  
  28. ////////////////////////////////////////////////////////
  29. void monitor(queue<string> &r)
  30. {
  31.      
  32.      int n = r.size();
  33.      
  34.      queue<string>::iterator it;
  35.      
  36.     // it = r.begin();
  37.      
  38.      for(int i = 0; i < n; i++)
  39.      {
  40.         // cout << *it << endl;
  41.          
  42.        //  it++;    
  43.      }
  44.      
  45. }
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69. /*
  70. #include  <iostream>
  71. #include    <string>
  72. #include    <vector>
  73. using namespace std;
  74.  
  75.  
  76. void monitor(vector<float> &r);
  77.  
  78. /////////////////////////////////////////////////////
  79. int main()
  80. {
  81.    
  82.    vector<float> v_f (9, 2);  
  83.    
  84.    vector<float>::iterator it = ;    
  85.        
  86.    cout << " v_f.size() = " << v_f.size() << endl;
  87.    
  88.    v_f.insert(v_f.begin(), 7.54);
  89.    
  90.    it = &(v_f[4]);
  91.    
  92.    v_f.push_back ( 4.3);   
  93.  
  94.    monitor(v_f);
  95.    
  96. }
  97.  
  98.  
  99. ////////////////////////////////////////////////////////
  100. void monitor(vector<float> &r)
  101. {
  102.      
  103.      for(int i = 0; i < r.size(); i++)
  104.      {
  105.              
  106.          cout << "v_f[] = "<< r[i] << endl;            
  107.      }
  108. }
  109.  
  110.  
  111.  
  112. */
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131. /*
  132.  
  133. #include  <iostream>
  134. #include    <string>
  135. #include    <vector>
  136. using namespace std;
  137. /////////////////////////////////////////////////////
  138. int main()
  139. {
  140.    
  141.    
  142.     string s1 = "SONY";
  143.  
  144.    
  145.    
  146.     cout << " s1.size()   = " << s1.size  () << endl;
  147.     cout << " s1.length() = " << s1.length() << endl;  
  148.    
  149. return 0;
  150. }
  151. */
  152.  
  153.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement