How do i execute a .exe during runtime?
Printable View
How do i execute a .exe during runtime?
Oh, lemme guess - you've read the FAQ but lost the link to it
http://faq.cprogramming.com/cgi-bin/...&id=1043284392
this is more than likely found on the faq too, but how can i use arguments as a password ?
for instance-
i'd like to use a few args as a password for my project:
cmdline>programInC password anotherOne aFieForSomething
i tried accessing them through an if statement:
but it skipped the if and did nothing or just ran right into the brackets if the password was right or wrong :eek:Code:if (args[1] == "somePassWordIMightUse") { allowThis() }
strcmp(args[1], "somePassWordIMightUse")
== wont work here
do i put that in the if statement?
Yes.
Quote:
http://www.acm.uiuc.edu/webmonkeys/b...14.html#strcmp
Returns zero if the first n bytes (or null terminated length) of str1 and str2 are equal. Returns less than zero or greater than zero if str1 is less than or greater than str2 respectively.