i know there are a couple of questions similar to this one out there but and while i have browsed through them, none have been able to resolve my problem. My code takes in three strings as parameters
on cmd
volume.exe NameOfInputFile.txt string1 string2
the code
int main(int argc, char* argv[])
{
string s1=argv[2],s2=argv[3];
fstream file;
file.open(argv[1],ios::in);
..rest of the code..
}
this works fine on the terminal in linux as
./volume.exe NameOfInputFile.txt string1 string2
but how do i get it to work on windows? I tried this but did not work
start /b /d volume.exe NameOfInputFile.txt string1 string2
start /b /d "volume.exe NameOfInputFile.txt string1 string2"
should work just fine. Why wouldn't it work?/d
parameter is used to set a working directory. Try running this command instead:start /b volume.exe NameOfInputFile.txt string1 string2
start /b volume.exe NameOfInputFile.txt string1 string2
works norstart /b /d "C:..address.." volume.exe NameOfInputFile.txt string1 string2