Kruskal's Algorithm

Why am i getting this error???

@Bhawna can you send the code please?

D:\Transfer\Bhawna\COMPETETIVE CODING\Graph 06 - Minimum Spanning Trees\2)Graphs - Kruskal’s Code\Graphs - Kruskal’s Code.cpp: In function ‘int main()’:
D:\Transfer\Bhawna\COMPETETIVE CODING\Graph 06 - Minimum Spanning Trees\2)Graphs - Kruskal’s Code\Graphs - Kruskal’s Code.cpp:65:21: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
edgelist.push_back({w,i,j});
^
D:\Transfer\Bhawna\COMPETETIVE CODING\Graph 06 - Minimum Spanning Trees\2)Graphs - Kruskal’s Code\Graphs - Kruskal’s Code.cpp:65:29: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
edgelist.push_back({w,i,j});
^
D:\Transfer\Bhawna\COMPETETIVE CODING\Graph 06 - Minimum Spanning Trees\2)Graphs - Kruskal’s Code\Graphs - Kruskal’s Code.cpp:65:29: error: no matching function for call to ‘std::vector<std::vector >::push_back()’
D:\Transfer\Bhawna\COMPETETIVE CODING\Graph 06 - Minimum Spanning Trees\2)Graphs - Kruskal’s Code\Graphs - Kruskal’s Code.cpp:65:29: note: candidate is:
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\vector:64:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\queue:61,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\mingw32\bits\stdc++.h:85,
from D:\Transfer\Bhawna\COMPETETIVE CODING\Graph 06 - Minimum Spanning Trees\2)Graphs - Kruskal’s Code\Graphs - Kruskal’s Code.cpp:1:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_vector.h:901:7: note: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::vector; _Alloc = std::allocator<std::vector >; std::vector<_Tp, _Alloc>::value_type = std::vector]
push_back(const value_type& __x)
^
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_vector.h:901:7: note: no known conversion for argument 1 from ‘’ to ‘const value_type& {aka const std::vector&}’
[Finished in 0.9s with exit code 1]
this is error and
code is https://ide.codingblocks.com/s/306416

@Bhawna just update vector<vector < ll>> edgelist instead of int, and it is working fine!
make sure that your compiler is upto date to support edgelist.push_back({w,i,j});
else you may first insert w,i,j in a vector and then insert this vector in edgelist

Code Modified https://ide.codingblocks.com/s/306567
But I am not getting output Why??

@Bhawna it is showing the output!

I think my sublime is not working ,It is not giving any output .
but same code is giving output in online ide.

@Bhawna yes this seems a case!, you may reinstall the mingw compiler

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.