0

hiiii...

I wanna create a small application .And by giving a user name and password only it allows the user to enter in to the application . Here I wanna store the user name a and pass word in a text file and I've to check it with the password , what the user given.

Can you give any link ,for search user name and password with in a text file.....
I use the c' language .

Thanking you
--------------------------

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by adcodingmaster
0

store user name and password in a text file in this format

username password

to creat a new file follow http://www.cplusplus.com/reference/clibrary/cstdio/fopen/

to read from a file follow http://www.cplusplus.com/reference/clibrary/cstdio/fscanf/

when u read using fscanf it will read untill space character. means it will read only username compare the user name using http://www.cplusplus.com/reference/clibrary/cstring/strcmp/

if username is correct then read password using fscanf and compare

try to make a habit of searching urself

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.