TSP problem line 52 error plz give me currect code

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;
}

Hey @dineshjatdtu, can you please upload your code on google drive and share the link with me over here ? It is very difficult to understand the code from the chat.

Thanks ! :slight_smile:

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.