C and C++

Moderators: None (Apply to moderate this forum)
Number of threads: 28695
Number of posts: 94715

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
write data to file Posted by oni on 6 Aug 2005 at 6:29 AM
I want the programs for register an login for my program massageboard that write by c/c++. this program use file text-document for storage username and password account
detail of this program
first page
1.register
2.login
3.exit
please select chioce :_
-when register you can not use username that someone had already registered(that storage in file)
-when register must type password 2 times
register page
firstname____________
lastname_____________
username_____________
password_____________
confirmpass__________
after register it loop to firstpage
login page
username_________
password_________
if input username or password incorrect show page incorrect and choice for try again,register or exit
if input correct show page report for account
please help me to write this program and place the sourcecode here
Thank very very much

Report
Re: write data to file Posted by stober on 6 Aug 2005 at 8:01 AM
nobody here is going to do your homework for you. Write the code yourself and ask questions, but please don't ask us do to your work. If that's what you want, then you might as well go back home to your mommy.
Report
Re: write data to file Posted by oni on 6 Aug 2005 at 8:55 AM
sorry
ok now I do this but I have problem in this point
-how to do if the username that you are registering had already register and wrote in the file .how to do for cheak
-how to do when login if username that you input does not found
in file .how to do for check
Report
Re: write data to file Posted by stober on 6 Aug 2005 at 10:02 AM
: sorry
: ok now I do this but I have problem in this point
: -how to do if the username that you are registering had already register and wrote in the file .how to do for cheak
: -how to do when login if username that you input does not found
: in file .how to do for check
:

you probably already know the basic file handling functions, such as how to open the file, read a line (or record) and close the file. If you don't, then study up on those topics which you will find in every c or c++ programming book exactly how to do that depends on whether you are writing a c or c++ program.

after the user enters a user-name, read the file and search for that name. How to do that depends on how you write it. You need to do a little pre-planning about how you want to write the file. It should contain, at a minimum, the user name and password.
Report
Re: write data to file Posted by oni on 6 Aug 2005 at 10:28 AM
I know basic file handling functions such as fscanf fprintf
but i can not write function to check input username to username in file

Report
Re: write data to file Posted by Donotalo on 6 Aug 2005 at 7:45 PM
: I know basic file handling functions such as fscanf fprintf
: but i can not write function to check input username to username in file

u can load all the names from the file to a string array (i mean char[][] array). then for the name input by the user, search that name within the array.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.