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_38784349_10488.cpp: In function 'int main()':
0_0_38784349_10488.cpp:62:30: error: 'dis' was not declared in this scope; did you mean 'div'?
   62 |                         cin>>dis;
      |                              ^~~
      |                              div
0_0_38784349_10488.cpp:64:36: error: no matching function for call to 'std::vector<edge>::push_back(<brace-enclosed initializer list>)'
   64 |                         e.push_back({i,j,dis});
      |                         ~~~~~~~~~~~^~~~~~~~~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/vector:66,
                 from 0_0_38784349_10488.cpp:2:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:1276:7: note: candidate: 'constexpr void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = edge; _Alloc = std::allocator<edge>; value_type = edge]'
 1276 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:1276:35: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::vector<edge>::value_type&' {aka 'const edge&'}
 1276 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:1293:7: note: candidate: 'constexpr void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = edge; _Alloc = std::allocator<edge>; value_type = edge]'
 1293 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:1293:30: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<edge>::value_type&&' {aka 'edge&&'}
 1293 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~


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-10-06 22:36:17, Gzip enabled