clrscr(); int d;
cout<<"\n\n\n\n\n\t\t\tEnter your destination!!\n\t\t\tEnter respective number\n\t\t\t1. Delhi\n\t\t\t2. Mumbai\n\t\t\t3. Chennai\n\t\t\t4. Kolkata\n\t\t\t";
cin>>d;cout<<"\n\t\t\t";
if(d==1)
{cout<<"You have chosen Delhi as your destination ";}
else if(d==2)
{cout<<"You have chosen Mumbai as your destination ";}
else if(d==3)
{cout<<"You have chosen Chennai as your destination ";}
else if(d==4)
{cout<<"You have chosen Kolkata as your destination ";}
else
{cout<<"Wrong option!! Aborting!!";exit(0);}
getch();
cout<<"\n\t\t\tPlease Wait ";
for(i=0;i<10;i++)
{cout<<" . ",delay(50);}
if(d==1)
file("delhi.doc",ios::in|ios::app);
else if(d==2)
file("mumbai.doc",ios::in|ios::app);
else if(d==3)
file("chennai.doc",ios::in|ios::app);
else if(d==4)
file("kolkata.doc",ios::in|ios::app);
}
In the last lines when I declare any filestream it shows an error that "a function cannot be declared here" and "multiple declaration of file". What does that mean and what is the solution.Please help!!