What is the compilation error?

#include<bits/stdc++.h>
using namespace std;
class Graph{
map<int,list<pair<int,int>>> m;
public:
void addEdge(int x,int y,int w){
m[x].push_back(make_pair(y,w));
m[y].push_back(make_pair(x,w));
}
map<int,int> dijkstra(int src){
map<int,int> dist;
for(auto it:m){
dist[it.first]=INT_MAX;
}
dist[src]=0;
set<pair<int,int>> s;
s.insert(make_pair(dist[src],src));
while(!s.empty()){
pair<int,int> p=*(s.begin());
s.erase(s.begin());
int node=p.second;
int nodeDist=p.first;
for(auto it:m[node]){
int child=it.first;
int childDist=it.second;
int distance=dist[child];
if(childDist+nodeDist<distance){
auto f=s.find(make_pair(dist[child],child));
if(f!=s.end()){
s.erase(f);
}
dist[child]=childDist+nodeDist;
s.insert(dist[child],child);
}
}
}
return dist;
}
};
int main(){
int t;
cin>>t;
while(t–){
int n,m;
cin>>n>>m;
Graph g;
for(int i=0;i<m;i++){
int x,y,w;
cin>>x>>y>>w;
g.addEdge(x,y,w);
int s;
cin>>s;
map<int,int> ans=g.dijkstra(s);
for(auto it:ans){
int node=it.first;
int distance=it.second;
if(node!=s){
cout<<distance<<" ";
}
}
cout<<endl;
}
}
}

Hi… pls save ur code on ide and send…

u can refer to my code https://ide.codingblocks.com/s/603776
if u face any difficulty…

it is resolved…

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.