Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 14:37

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



remove() function.

Discussion on remove() function. within the C/C++ forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2008
Posts: 224
Received Thanks: 17
remove() function.

Hey guys.

I am attempting to create a function with deleting commands.

PHP Code:
void DELGG(){
remove("GameGuard\npgg.erl");
remove("GameGuard\npgl.erl");
remove("GameGuard\npgm.erl");
remove("GameGuard\npgmup.erl");
remove("GameGuard\npsc.erl");

i have it placed in attaching and detaching and set it for when my main function executes.

the problem is it doesnt delete. could it be that i have no writing access to those files. i dont think it would be this. any ideas is invited.
syndrah is offline  
Old 09/12/2012, 21:26   #2


 
MrSm!th's Avatar
 
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,904
Received Thanks: 25,394
Where did you find that remove() function?
MrSm!th is offline  
Old 09/13/2012, 06:24   #3
 
elite*gold: 0
Join Date: Nov 2008
Posts: 224
Received Thanks: 17
as in what sense?

#include "stdio.h" is where it comes from.
syndrah is offline  
Old 09/16/2012, 18:36   #4
 
elite*gold: 0
Join Date: Jun 2012
Posts: 187
Received Thanks: 58
"i dont know why it doesnt work but im way too stupid to check for the errors these functions might return"
tnd0 is offline  
Old 09/17/2012, 21:47   #5
 
elite*gold: 0
Join Date: Dec 2011
Posts: 367
Received Thanks: 199
you have try whit #include <stdio.h>?

i created for you a function.. i don't have try but i think that he worked..

Code:
#include <stdio.h>

int main()
{
if(remove("myfile..") != 0)
{
perror("Error deleting file");
else
{
puts("File successfully deleted");
}
return 0;
}
}
Kingrap is offline  
Old 09/18/2012, 00:24   #6
 
elite*gold: 0
Join Date: Sep 2012
Posts: 51
Received Thanks: 30
Errors can be:
1- Invalid filename (maybe wrong path from current).
2- The file is in use (try first closing it).
3- You have no permission.

To ensure, I first would check if filename is ok and the file is found:
Code:
if (FILE * file = fopen("GameGuard\npgg.erl", "r"))
    {
        fclose(file);
        remove(file);
    }
urgabel is offline  
Reply


Similar Threads Similar Threads
Petition To Remove DK evoltion off Dont remove it
01/08/2011 - Dekaron Private Server - 12 Replies
Ex dev of AG dekaron is working with Dekaron Evo. Which he posted the of AG selling a Autovoter which the dev from AG has been fire for over a month!!! also everything is edited off the autovoter that SexyBitch released Photoshop anyone!!!! and Han 911Hacker owner of dekaron evolution posted the petition!!!!!!!!! Top100 Autovote link: New Page 1 this is translated IP 74.52.31.2 THe IP of that adress is the same as Dekaron Evolutions LoginServer IP in Housten Texas!!!!!!!!!!!!!!!!!!!!!!!...
[VIP-function] ToxicSYS [VIP-function]
08/14/2010 - WarRock Hacks, Bots, Cheats & Exploits - 1 Replies
heeeey E-pvpers :pimp: this is a new hack by TSYS Status : UNDETECTED Functions (VIDEO) : YouTube - WarRock - Bikini event VIP hack



All times are GMT +2. The time now is 14:37.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.