Obsessive Quest253 | Tastes of Italia April 2012 | Dirtbiker (0)

password help! - Software Development | DaniWeb

Loading...

Hardware and Software (/hardware-and-software/1)

Programming (/programming/4)

Digital Media (/digital-media/5)

Community Center (/community-center/3) Home (/) / Forums (/forums) / Programming Forum (/programming/4) / Software Development Forum (/programming/software-development/2)

password help!

(http://www.facebook.com/sharer/sharer.php?u=https%3 (http://twitter.com/intent/tweet?text=pas (http://plus.google.com (http://w

(/p

(/members/1122675/asira18) Asira18 (/members/1122675/asira18)

Related Topics

2 Years Ago (http://www.daniweb.com/programming/software-development/threads/496337/password-h…

de

pa

Login functionality in C-language 1. #include 2. #include 3. #include 4. #include 5. using namespace std; 6. /* run this program using the console pauser or add your own getch, system("pa use") or input loop */ 7. 8. int main(int argc, char** argv) 9. 10. 11. { 12. 13. char bname[97],number[34],code[22], name[10],bcate[10],pass,book,author,ID ,school,course ; 14. char type, address[5],x,department,quantity,choice,date[10],aname[20],btit le[50], bcode[9] ; 15. int getch(); 16. int num1,num2,num3,num4,num5,num6,num7,num8,op,a, ph[20],num,i=0; 17. int input[10]; 18. 19. 20. 21. 22. 23. 24. 25. cout<<"\t\tWELCOME TO OUR LIBRARY"<>name; 29. cout<<""<='a' && a<='z')||(a>='A' && a<='Z')||(a>='1' && a<='9')) 37. { 38. ph[num]=a; 39. cout<<"*"; 40. ++num; 41. } 42. 43. if(a=='\r') 44. { 45. ph[num]='\0'; 46. break; 47. } 48. } 49. 50. if(pass=='input') 51. { 52. cout<<"PASSWORD ACCEPTED"<>input[10]; 86. 87. 88. 89. 90. 91. if(input[10]==1) 92. { 93. cout<<"\t\t1.NEW BOOK ENTRY"<>btitle; 100. cout<<""<>aname; 104. cout<<""<>bcode; 108. cout<<""<>bcate; 112. 113. 114. cout<<"\nNEW BOOK ENTRY SUCCESSFUL"<>ID; 122. cout<<""<>name; 125. cout<<""<>school; 128. cout<<"\t\tEnter address"<>address; 130. 131. cout<<""<>course; 134. cout<<"\t\t\nRECORD CREATED SUCCESSFULLY!!"<>name; 141. cout<<"ENTER CARD NUMBER"<>number; 143. 144. cout<<"ENTER CARD NAME"<>name; 146. cout<<"ENETR BOOK NAME YOU WANT TO BUY"<>bname; 148. 149. cout<<"ENTER BOOK CODE"<>code; 151. 152. cout<<"ENTER ADDRESS"<>date; 154. 155. cout<<"QUANTITY YOU WANT BUY"<>quantity; 157. 158. cout<<"THANKS FOR PURCHASING"<>name; 165. cout<<""<>name; 170. cout<<"\t\tOR"<>code; 174. } 175. 176. 177. if(input[10]==5) 178. { 179. cout<<"Linguistics"<>name; 206. cout<<"ENTER DEPARTMENT"<>department; 208. cout<<"ENTER COURSE NAME"<>name; 210. cout<<""<>bname; 213. cout<<""<>code; 216. cout<<""<>date; 219. cout<<""<>number; 222. cout<<""<>date; 225. cout<<"*BOOK SHOULDNT BE TAKEN FOR MORE THAN 1WEEK*"<>name; 235. cout<<"ENETR BOOK NAME YOU WANT TO RETURN"<>bname; 237. cout<<""<>code; 240. cout<<""<>date; 244. cout<<"ENTER DATE OF RETURNING BOOKS"<>date; 246. cout<<""<>name; 255. 256. cout<<""<>address; 259. 260. cout<<"Please enter book type(s) you wnat to donate"<>type; 262. 263. cout<<""<>quantity; 266. 267. cout<<""<
(/programming/software-

ch

development/code/217246/login-

(/p

functionality-in-c-language) - 6 replies

de

up Another C++ question..password

fo

validator (/programming/softwaredevelopment/threads/496281/another-cquestion-password-validator) - 12 replies

(/p

de password help!

wi

(/programming/softwaredevelopment/threads/496338/password-help) - 5 replies

Us

(/p A Simple Login Form for C#

de

(/programming/software-

de

development/code/454432/a-simple-login-

5

form-for-c) - 9 replies

Hi guys this is the code i wrote for a library,i have tried adding the password feature to it but when i input a wrong password and username it still takes me to the program instead rejecting it and if i input the correct one too it still takes me to the program, i would like you guys to help me solve the problem, like when i input a wrong password it shouldnt open the program it should reject the login and when i input the correct one it should it should accept

0

and give me access to the program. Thank you. c++ (/tags/c%2B%2B)

2



login (/tags/login)

1

Contributors

9

Reply



password (/tags/password)

2 Years

Views

Discussion Span

2 Years Ago (/programming/soft waredevelopment/thread s/496337/password -help#post2171759) Last Post by tinstaafl

(/members/780152/tinstaafl) tinstaafl 1,045

(/members/780152/tinstaafl)

2 Years Ago (http://www.daniweb.com/programming/software-development/threads/496337/password-h…

The only thing your code is doing once the password is checked, is telling the user whether it's valid or not. I would suggest a bool and a while loop:

0

1. string name = ""; 2. string ph = ""; 3. bool done = false; 4. while (!done) 5. { 6. cout << "Enter Username\n"; 7. cin >> name; 8. cout << "" << endl; 9. cout << "ENTER PASSWORD\n"; 10. cin >> ph; 11. if (ph == 'input') 12. { 13. done = true; 14. cout << "PASSWORD ACCEPTED\n"; 15. } 16. else 17. { 18. cout << "Login rejected\nTry again.\n"; 19. } 20. }

This topic has been dead for over six months. Start a new discussion instead. (/programming/software-development/2/contribute) Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules (/welcome/rules).

Code

Inline Code

Preview

Link

H1

H2

(/welcome/syntax)

Post your Reply Alt+S

(http://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.daniweb.com%2Fprogramming%2Fsoftware-development%2Fthreads%2F496337%2Fpassword-help) (http://twitter.com/intent/tweet?text=password+help%21&via=daniweb&url=https%3A%2F%2Fwww.daniweb.com%2Fprogramming%2Fsoftware-development (http://plus.google.com/share?url=https%3A%2F%2Fwww.daniweb.com%2Fprogramming%2Fsoftware-development%2Fthreads%2F4 (http://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fwww.daniweb.com%2Fprogramming%2Fsoft (/rss/2)

Recommended Topics transfer Data to Datagridview from another Form (/programming/softwaredevelopment/threads/515975/tran sfer-data-to-datagridview-fromanother-form)

Get Current Location GoogleMaps API Android (/programming/threads/514343/ge t-current-location-googlemapsapi-android)

Non Fibonacy series on c++ (/programming/softwaredevelopment/threads/515998/nonfibonacy-series-on-c) Last Post 1 Day Ago

Last Post 19 Hours Ago

Last Post 53 Minutes Ago

Good Morning everyone, Is this something which is updated to Dear Friends, I am facing a problem, I

different method or am i doing something

have two forms,

wrong?

Form1 Has one DataGrideview and Button

I want to get my current location on

redirect to Form2, which has

Google Maps what am doing right now ...

Button(Browse Excel File) and combobox(Sheet No of excel ...

My intention is not to get someone to do the whole code to help me but I'm currently learning c++ and I'm working on a homework project ...

About Us (/welcome/about)

Newsletter Archive

Contact Us

(/email/archive)

(/welcome/contact)

Community Forums

Donate (/donate/index)

(/forums)

Advertising

Recent Topics

(/welcome/advertising)

(/articles/latest)

Vendor Program

Recommended Topics

(/welcome/vendors)

(/articles/latest/recommend

Terms of Service

ed)

© 2002 - 2018 DaniWeb® LLC 3825 Bell Blvd., Bayside, NY 11361 516 222-1700

(/welcome/tos) API (/welcome/api)

HelloSign API: Everything IT requires and Developers love.

HelloSign

Loading...

password help! - Software Development | DaniWeb

Hardware and Software (/hardware-and-software/1) Programming (/programming/4) Digital Media (/digital-media/5) Community Center (/community-cen...

153KB Sizes 3 Downloads 6 Views

Recommend Documents

Zuul help - Software Development | DaniWeb
May 14, 2009 - This class is part of the "World of Zuul" application. * "World of Zuul" is a very simple, text based adv

C++ Books - Software Development | DaniWeb
It is not a coding standards book, but rather a guide to best practices in C++ code and would fit perfectly as an introd

C++ Shopping List - Software Development | DaniWeb
basicly my project is making a shopping list which allow the user to: - type 1 to add a new shopping ...

Password Management Software | Password Manager | One Identity
Password Manager provides a simple, secure, self-service solution that enables end users to reset forgotten passwords, a

Enterprise ID (EID) & Password Help - Marriott Password Challenge
Step 1: Use the link below to access the Password Challenge application; Step 2: Enroll in Marriott Password Challenge >

3 | Agile Software Development | Scrum (Software Development)
Oct 18, 2015 - What does it mean when we say that an event has a timebox? (Select One) Difficulty Level : Course Templat

Software Development
May 14, 2014 - 7. Yashawant Kanetkar's “Test Your C Skills” and “ Test Your C++ Skills “ are good for skill test

Download Free Wifi Password Hacker Software
download months encourage offered rather, but active testers 've to rollouts and offered Supposedly to the Sound escape

Agile test | Scrum (Software Development) | Agile Software Development
What is MOST important for multiple Development Teams working on delivering one big product? (Select One) Difficulty Lev

Word Processing - Software Development
Nov 27, 2017 - Introduction. IT Policy; File Management; Tutorials/MOOCs/Youtube; Backup your files on Google Drive/clou