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_39174860_20566.cpp: In function 'int main()':
0_0_39174860_20566.cpp:9:13: error: 'vector' was not declared in this scope
    9 |             vector<double> vec;
      |             ^~~~~~
0_0_39174860_20566.cpp:9:13: note: suggested alternatives:
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/vector:66,
                 from 0_0_39174860_20566.cpp:2:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:423:11: note:   'std::vector'
  423 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/vector:86:13: note:   'std::pmr::vector'
   86 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
0_0_39174860_20566.cpp:9:20: error: expected primary-expression before 'double'
    9 |             vector<double> vec;
      |                    ^~~~~~
0_0_39174860_20566.cpp:13:17: error: 'vec' was not declared in this scope
   13 |                 vec.push_back(val);
      |                 ^~~
0_0_39174860_20566.cpp:18:21: error: 'vec' was not declared in this scope
   18 |                 if (vec[i] % 2) {
      |                     ^~~


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-19 06:39:40, Gzip enabled