F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_38588133_16812.cpp: In function 'int main()':
0_0_38588133_16812.cpp:4:12: error: 'vector' was not declared in this scope
  int n, m; vector<int> a;
            ^~~~~~
0_0_38588133_16812.cpp:4:12: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
0_0_38588133_16812.cpp:1:1:
+#include <vector>
 using namespace std;
0_0_38588133_16812.cpp:4:12:
  int n, m; vector<int> a;
            ^~~~~~
0_0_38588133_16812.cpp:4:19: error: expected primary-expression before 'int'
  int n, m; vector<int> a;
                   ^~~
0_0_38588133_16812.cpp:5:9: error: 'scanf' was not declared in this scope
  while (scanf("%d", &n) != EOF)
         ^~~~~
0_0_38588133_16812.cpp:5:28: error: 'EOF' was not declared in this scope
  while (scanf("%d", &n) != EOF)
                            ^~~
0_0_38588133_16812.cpp:5:28: note: 'EOF' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
0_0_38588133_16812.cpp:1:1:
+#include <cstdio>
 using namespace std;
0_0_38588133_16812.cpp:5:28:
  while (scanf("%d", &n) != EOF)
                            ^~~
0_0_38588133_16812.cpp:10:4: error: 'cin' was not declared in this scope
    cin >> m; a.push_back(m);
    ^~~
0_0_38588133_16812.cpp:10:4: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
0_0_38588133_16812.cpp:1:1:
+#include <iostream>
 using namespace std;
0_0_38588133_16812.cpp:10:4:
    cin >> m; a.push_back(m);
    ^~~
0_0_38588133_16812.cpp:10:14: error: 'a' was not declared in this scope
    cin >> m; a.push_back(m);
              ^
0_0_38588133_16812.cpp:17:23: error: 'a' was not declared in this scope
   for (int i = 0; i < a.size(); i++)
                       ^
0_0_38588133_16812.cpp:19:13: error: 'cout' was not declared in this scope
    if (a[i])cout << a[i] << endl;
             ^~~~
0_0_38588133_16812.cpp:19:13: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
0_0_38588133_16812.cpp:19:29: error: 'endl' was not declared in this scope
    if (a[i])cout << a[i] << endl;
                             ^~~~
0_0_38588133_16812.cpp:19:29: note: 'std::endl' is defined in header '<ostream>'; did you forget to '#include <ostream>'?
0_0_38588133_16812.cpp:1:1:
+#include <ostream>
 using namespace std;
0_0_38588133_16812.cpp:19:29:
    if (a[i])cout << a[i] << endl;
                             ^~~~
0_0_38588133_16812.cpp:21:3: error: 'a' was not declared in this scope
   a.clear();
   ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-26 00:31:26, Gzip enabled