Click here to Skip to main content
15,921,577 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a projet with some user and their information have saved in ha file i want to creat a project that any user can iput his username and password an if his informatian were true he can enter to his menu
like this
at first login
please inter your username:
please inter your password:
an then if they were true he can enter to a menu like this
inser an objectI have a projet with some user and their information have saved in ha file i want to creat a project that any user can iput his username and password an if his informatian were true he can enter to his menu
like this
at first login
please inter your username:
please inter your password:
an then if they were true he can enter to a menu like this
1)insert an object
2)delete an object
3)edit an object
4)change your password
in this project i have to files one file for users information an one file for object information
Posted

1 solution

(please edit your post to make it a bit clearer, you have duplication in there)

yeah, so ? what have you done up to now ?

Is this a console application ? or a GUI application ?

I assume it's a console application...

Learn and use std::cin, std::cout to print and read information on the screen.

Something like:

std::string username;
std::string password;
std::cout << "enter username" << std::endl;
std::getline (cin,username);
std::count << "enter password" << std::endl;
// here you should be more "intelligent" and find a way to display ***** instead of the password 
std::getline( cin, password ); 
if ( checkUserPassword ( username, password ) 
{
 // continue...
}
else
{
// exit
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900