RE: A C++ Password Program 05-17-2012, 04:36 AM
#11
Huh, so you would get to the 492093th line that includes a password...
To hack is a skill, but a skill may or may not be to hack.
| A C++ Password Program filter_list | |

if (strcmp("hello",cstring_that_says_hello)) { //same string }if (strcmp("hello","hello") == 0) { //these strings are the same }(09-16-2012, 04:18 PM)Rodaxoleaux the Lab Rat Wrote: Also a little bit more insight. You probably tried to use strcmp aswhen actually, if strcmp finds that the strings are the same, it returns 0, not true.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.
:epic:
]
(04-21-2012, 08:35 PM)Frooxius Wrote:
Also there's no reason to put code in curly brackets if you don't have more than one statement. It could be rewritten as this:
if(pass == PASSWORD)
first statement;
second statement;if(pass == PASSWORD);
second statement; //thinking this is the first statement![[Image: 2YpkRjy.png]](http://i.imgur.com/2YpkRjy.png)