E
Ed LaBonte
I'm a rank beginner in C programming and I'm using gcc in a Linux OS. I am
getting my feet wet with a little program which trains people to calculate
days of the week from dates in their head. The practice exercizes are in c
and the tutorial is a text file in the same directory as the executable.
I access the tutorial from within the program by using the system()
function with "less". system("less tutorial"). That works fine so long as
the user is in the right directory when he is running the program. I
realize that the best way would be to specify the complete path, but I
don't know where the user will be installing the program directory. Is
there any way I can specify that it is in the same directory as the
executable? What would be the best way to handle this problem?
getting my feet wet with a little program which trains people to calculate
days of the week from dates in their head. The practice exercizes are in c
and the tutorial is a text file in the same directory as the executable.
I access the tutorial from within the program by using the system()
function with "less". system("less tutorial"). That works fine so long as
the user is in the right directory when he is running the program. I
realize that the best way would be to specify the complete path, but I
don't know where the user will be installing the program directory. Is
there any way I can specify that it is in the same directory as the
executable? What would be the best way to handle this problem?