fork download
  1. #include <iostream>
  2. #include <list>
  3. using namespace std;
  4.  
  5. int main() {
  6. std::list<int> myList;
  7. int tam;
  8.  
  9. scanf("%d",&tam);
  10.  
  11. for (int i = 0;i < tam;i++){
  12. myList.push_back(i);
  13. }
  14.  
  15. std::list<int>::const_iterator;
  16. list(myList.begin());
  17. list(myList.end());
  18. for (;lit != lend;++lit){
  19. ;
  20. }
  21.  
  22. // your code goes here
  23. return 0;
  24. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:15:18: error: declaration does not declare anything [-fpermissive]
  std::list<int>::const_iterator;
                  ^
prog.cpp:16:7: error: missing template arguments before ‘(’ token
   list(myList.begin());
       ^
prog.cpp:17:7: error: missing template arguments before ‘(’ token
   list(myList.end());
       ^
prog.cpp:18:8: error: ‘lit’ was not declared in this scope
  for (;lit != lend;++lit){
        ^
prog.cpp:18:15: error: ‘lend’ was not declared in this scope
  for (;lit != lend;++lit){
               ^
stdout
Standard output is empty