![]() |
|
A C++ Password Program - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Coding (https://sinister.li/Forum-Coding) +--- Forum: C, C++, & Obj-C (https://sinister.li/Forum-C-C-Obj-C) +--- Thread: A C++ Password Program (/Thread-A-C-Password-Program) |
RE: A C++ Password Program - killerOfCode - 05-17-2012 Huh, so you would get to the 492093th line that includes a password... RE: A C++ Password Program - chipp - 05-19-2012 i don't understand, what do you mean by "492093th line" ? the password is 492093, and it doesn't have any meaning with the code's line... RE: A C++ Password Program - killerOfCode - 05-19-2012 I was suggesting that the password was from a file and that, ah never mind. ![]() I really wish I could just lock my threads.
RE: A C++ Password Program - chipp - 05-19-2012 we all learning bro...
RE: A C++ Password Program - killerOfCode - 05-21-2012 I tried thread tools but that didn't have anything about it. :/ RE: A C++ Password Program - bcom_bad - 09-16-2012 i am new to C programming so cant say anything RE: A C++ Password Program - Rodaxoleaux the Lab Rat - 09-16-2012 Also a little bit more insight. You probably tried to use strcmp as Code: if (strcmp("hello",cstring_that_says_hello)) { //same string }Code: if (strcmp("hello","hello") == 0) { //these strings are the same }Also it doesn't have to be from a file. You could just have the user set it at the first run of the program then you could store it in an encrypted database (which is a file) or update a resource with it in there, or you could set it as a registry value,... there's no limit as to what you could do. RE: A C++ Password Program - killerOfCode - 09-19-2012 (09-16-2012, 04:18 PM)Rodaxoleaux the Lab Rat Wrote: Also a little bit more insight. You probably tried to use strcmp as Yes, I was going to do that, but for SOME reason, it wouldn't let me do that. I added the whole header file and that, but it really didn't work. So annoying. :headbash: Anyway, the biggest point was to get the string with hidden input. :epic:[Also, after looking back on my code, I think I should have added \n at the end of the string. ]
RE: A C++ Password Program - piyushaegis - 12-28-2012 Good conversation, i try self and working life charm, Excellent work guys, Thanks all of you. RE: A C++ Password Program - Deque - 12-28-2012 (04-21-2012, 08:35 PM)Frooxius Wrote: Actually there are good reasons to use curly brackets, even if you have only one statement. People tend to forget them, when they add new statements and do something like this, wondering why it doesn't work: Code: if(pass == PASSWORD)
first statement;
second statement;Or people do something like this, also wondering why that doesn't work: Code: if(pass == PASSWORD);
second statement; //thinking this is the first statement@killerOfCode, NERO: A hardcoded plaintext password is useless. Usually you use a cryptographic hash function for the password the user put in and compare the hash value with a saved one. This way you have no plaintext saved anywhere. |