fork download
  1. #include <iostream>
  2. #include<string>
  3. using namespace std;
  4.  
  5. int main() {
  6. while(1){
  7. int n;
  8. cin>>n;
  9. if(n==0)return 0;
  10. string s;
  11. queue<string> q;
  12. for(int i=0;i<n;i++){
  13. cin>>s;
  14. q.push(s);
  15. }
  16. cout<<q.front.size()<<endl;
  17. }
  18. return 0;
  19. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:11:3: error: ‘queue’ was not declared in this scope
   queue<string> q;
   ^~~~~
prog.cpp:11:15: error: expected primary-expression before ‘>’ token
   queue<string> q;
               ^
prog.cpp:11:17: error: ‘q’ was not declared in this scope
   queue<string> q;
                 ^
stdout
Standard output is empty