M
MikeyD
That's nasty
Clemens Auer said:bit shorter and typo save ..
;-)
<code>
#include <stdio.h>
#include <string.h>
int main(int argc, char **argv)
{
remove(*argv);
return 0;
}
</code>
That's nasty
It's still nastyanything else.
Clemens Auer said:bit shorter and typo save ..
;-)
<code>
#include <stdio.h>
#include <string.h>
int main(int argc, char **argv)
{
remove(*argv);
return 0;
}
</code>
PS: your questions sounds lot like homework...
ROSY said:1.How to make self deletable .exe file such that during runtime the
file delete itself from the current path.
#include <stdio.h>
#include <string.h>
int main(void) {
char buffer[100];
printf("What is the name of this .exe file?\n");
fgets(buffer, sizeof buffer, stdin);
if (buffer[strlen(buffer)-1] == '\n')
buffer[strlen(buffer)-1] = '\0';
remove(buffer);
return 0;
}
--
/-- Joona Palaste ([email protected])
---------------------------\| Kingpriest of "The Flying Lemon Tree"
G++ FR FW+ M- #108 D+ ADA N+++|| http://www.helsinki.fi/~palaste
W++ B OP+
|\----------------------------------------- Finland rules!
------------/"Remember: There are only three kinds of people - those
who can count and those who can't."
- Vampyra
ROSY said:hello,
thats work good.then how can i delete the .exe automatically on
some future date.
ROSY said:thats work good.then how can i delete the .exe automatically on
some future date.
hello,
thats work good.then how can i delete the .exe automatically on
some future date.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.