sir code me error aarhi h line 52 me plz sir error remove kr dijiye
#include<bits/stdc++.h>
using namespace std;
#define INT_MAX 999999
int a[20][20],visited[20][20];
vectors;
int n;
int VISITED_ALL;
int path[1000][1000];
int dp[1000][1000];
int travllingSalesmanProblem(int graph[][20], int s)
{
// store all vertex apart from source vertex
vector vertex,v2;
for (int i = 0; i < n; i++)
if (i != s)
vertex.push_back(i);
// store minimum weight Hamiltonian Cycle.
int min_path = INT_MAX;
do {
// store current Path weight(cost)
int current_pathweight = 0;
// compute current path weight
int k = s;
for (int i = 0; i < vertex.size(); i++) {
current_pathweight += graph[k][vertex[i]];
k = vertex[i];
}
current_pathweight += graph[k][s];
// update minimum
if(current_pathweight<min_path)
{
min_path=current_pathweight;
v2=vertex;
}
//min_path = min(min_path, current_pathweight);
} while (
next_permutation(vertex.begin(), vertex.end()));
for(int i=0;i<v2.size();i++)
{
int x=v2[i];
cout<<s[x]<<" ";
}
return min_path;
}
int main(){
cout<<“Enter the no of cities”<<"\n";
cin>>n;
cout<<"Enter the starting city(0)"<<"\n";
string c;
cin>>c;
s.push_back(c);
cout<<"Enter the remaining cities"<<"\n";
for(int i=1;i<n;i++)
{
string c;
cin>>c;
s.push_back(c);
}
VISITED_ALL=(1<<n)-1;
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
if(visited[i][j]!=0)
{
cout<<"Enter Dist bw cities"<<" "<<i+1<<" and "<<j+1<<"\n";
cin>>a[i][j];
a[j][i]=a[i][j];
visited[i][j]=1;
}
}
}
cout<<travllingSalesmanProblem(a,0);
/* init the dp array */
for(int i=0;i<(1<<n);i++){
for(int j=0;j<n;j++){
dp[i][j] = -1;
path[i][j]=-1;
}
}
return 0;
}