Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <queue>
- using namespace std;
- /////////////////////////////////////////////////////
- int main()
- {
- queue<string> q_s;
- q_s.push( "SONY");
- q_s.push("Pictures");
- cout << "q_s.size() = " << q_s.size() << endl;
- }
- ////////////////////////////////////////////////////////
- void monitor(queue<string> &r)
- {
- int n = r.size();
- queue<string>::iterator it;
- // it = r.begin();
- for(int i = 0; i < n; i++)
- {
- // cout << *it << endl;
- // it++;
- }
- }
- /*
- #include <iostream>
- #include <string>
- #include <vector>
- using namespace std;
- void monitor(vector<float> &r);
- /////////////////////////////////////////////////////
- int main()
- {
- vector<float> v_f (9, 2);
- vector<float>::iterator it = ;
- cout << " v_f.size() = " << v_f.size() << endl;
- v_f.insert(v_f.begin(), 7.54);
- it = &(v_f[4]);
- v_f.push_back ( 4.3);
- monitor(v_f);
- }
- ////////////////////////////////////////////////////////
- void monitor(vector<float> &r)
- {
- for(int i = 0; i < r.size(); i++)
- {
- cout << "v_f[] = "<< r[i] << endl;
- }
- }
- */
- /*
- #include <iostream>
- #include <string>
- #include <vector>
- using namespace std;
- /////////////////////////////////////////////////////
- int main()
- {
- string s1 = "SONY";
- cout << " s1.size() = " << s1.size () << endl;
- cout << " s1.length() = " << s1.length() << endl;
- return 0;
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement