Need help in debugging this error.
Разница между en1 и en2, 30 символ(ов) изменены
So basically I have a vector<array<long long, 2>> adj[N]; and I want to access it's elements ↵
for(int i=0; i<n; ++i){↵
intlong long X=i;↵


                
intlong long Y=adj[i][1]; //gives error↵
intlong long W=adj[i][0]; //gives error↵
}↵

error: cannot convert '__gnu_cxx::__alloc_traits<std::allocator<std::array<int, 2> >, std::array<int, 2> >::value_type' {aka 'std::array<int, 2>'} to 'int' in initialization↵

I've been trying to solve what's wrong with this & why this isn't possible. Can someone help please?↵

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский bijju74 2022-07-02 22:50:30 30
en1 Английский bijju74 2022-07-02 22:49:36 538 Initial revision (published)