fork download
  1. #include <iostream>
  2. #include <queue>
  3. using namespace std;
  4. //Ejemplo 2
  5. int main() {
  6. queue <char> cola1;
  7. char i;
  8. for(i='a'; i<='z'; i++) cola1.push(i);
  9. cout << cola1.size() << endl;
  10. cout << cola1.front() << " " << cola1.back() << endl;
  11. cout << cola1.empty() << endl;
  12. while(!cola1.empty()){
  13. cout << cola1.front() << " ";
  14. cola1.pop();
  15. }
  16. cout << endl << cola1.empty();
  17. return 0;
  18. }
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
26
a  z
0
a  b  c  d  e  f  g  h  i  j  k  l  m  n  o  p  q  r  s  t  u  v  w  x  y  z  
1