Hey!
I am making a server and a client like FTP, but my own design. want
users to be able to login with usernames and pwords, which I have
stored in a file. My problem is, that i can't read from the file,
right now i have the following:
int main()
{
struct utmp current_record;
int utmpfd;
int reclen=sizeof(current_record);
if((utmpfd = open(UTMP_FILE, O_RDONLY)) == -1)
{
perror( UTMP_FILE);
exit(1);
}
.......
And it seems to work, cause i get a value for my filedescriptor. But
how do I acces the single lines in the file?
Can I use ifstreams? (This have worked for me in windows programming
earlier, but I think there is a difference in Linux).
I would be greateful if anybody could give me some hints, or help me
understand what to do better, cause I'm pretty lost.
Thank you for your help in advance.
Y.S.
Bo