C++/Linux Getting Users home directory/ Checking dev drivers
Posted on 2003-11-21
I have a few problems programming in linux/C++ that a just cant seem to find a answer for on the net.
I am using Kylix 3 pro and its help also hasent helped.
I need to get the path of the user that has executed my program.
For example i need to do the following code
char* homePath = USERS HOME DIR?
outFile = fopen(homePath, "w");
Is there an easy method of checking weather or not dev files are resedent?
I have a set of serial card drivers have been installed on the system and i need to check wether or not they have been installed.
The drivers have two dev files.
/dev/esccp0 and /dev/esccp1.
I have tried to use a fopen and a fstatus on these files to see if they are there, with no luck.
fopen returns NULL evan when they are peresent.
any help would be great