This piece of code gives me an error
struct state{
int time_taken;
vector<int>time_live;
string loc_name;
vector<int>loc;
};
for(int u=0;u<(A[start].loc.size());u++)
{
l=A[start].loc[1];
if(A[l].time_taken < min_time)
{
min_time=A[l].time_taken;
finish = l;
}
}
This gives a segmentational fault .