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_17253410_17227.cpp: In function 'int main()':
0_0_17253410_17227.cpp:40:29: error: expected ']' at end of input
                   cout<<v[v.size
                             ^
0_0_17253410_17227.cpp:40:26: error: no match for 'operator[]' (operand types are 'std::vector<int>' and '<unresolved overloaded function type>')
                   cout<<v[v.size
                          ^
0_0_17253410_17227.cpp:40:26: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/vector:64:0,
                 from 0_0_17253410_17227.cpp:4:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:779:7: note: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::reference = int&; std::vector<_Tp, _Alloc>::size_type = long long unsigned int]
       operator[](size_type __n) _GLIBCXX_NOEXCEPT
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:779:7: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::vector<int>::size_type {aka long long unsigned int}'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:794:7: note: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) const [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::const_reference = const int&; std::vector<_Tp, _Alloc>::size_type = long long unsigned int]
       operator[](size_type __n) const _GLIBCXX_NOEXCEPT
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:794:7: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::vector<int>::size_type {aka long long unsigned int}'
0_0_17253410_17227.cpp:40:29: error: expected '}' at end of input
                   cout<<v[v.size
                             ^
0_0_17253410_17227.cpp:40:29: error: expected '}' at end of input
0_0_17253410_17227.cpp:40:29: error: expected '}' at end of input


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-12-04 15:01:17, Gzip enabled