Why This Program is not Changing Directory from C:/ to H: Drive or D: Drive.
#include<iostream>
using namespace std;
int main(int a,char *b[])
{
int option;
cout<<endl<<"Enter 2 for 2nd Semster Programs "<<endl;
cout<<endl<<"Enter 3 for 3rd Semster Programs "<<endl;
cin>>option;
if(option==2)
{
system("D:");
system("explorer .");
}
else if(option==3)
{
system("H:");
system("explorer .");
}
else
{
system("explorer c:/");
}
system("pause");
}