I created a program that accepts an input file into the program. When i run it in the window's command prompt, i type:

Code:

PickBestSort scratch2.txt

PickBestSort refers to the .exe file of my program, and scratch2 is the input file. When i run it this way it works fine. When i uploaded the files onto a unix machine, i can't run it the same way. I have to type:

Code:

g++ PickBestSort.cpp
./a.out scratch2.txt

to get it to run. So, my question is, how could i get it to run the way i did it in the windows command prompt - if this is possible.

That is the way you got it to run in the Windows machine: programname filename. If you mean "hey the current directory isn't in the path", that's true. It usually never is on *nix machines, generally to save you from yourself. If you mean "hey all of a sudden my program is called a.out", well, g++ takes a switch on the command line that tells it what the output should be: