Your code uses overly complicated constructs. Why not just do it the straightforward C++ way:
#include <fstream>
int main()
{
std::ifstream input1("input1.txt");
while(input1 >> fileName >> source >> destination)
{
std::ifstream file(fileName.c_str());
mp.clear();
mp1.clear();
for(int i=0;i<cityNumber;i++)
adj[i].clear();
cityNumber = 0;
while(file >> city1 >> city2 >> distanc)
{
//work with values
}
}