Tuesday, July 28, 2009

Friends, can you Please tell me how to delete a file in 'C' or 'C++'?

Well...If ur using Turbo C/C++ then go to the command prompt, then go to ur particular folder..Like say for eg, ur file is in a folder named myfolder say cd myfolder then it'll be in ur folder, then u can type DIR to see d list of files, then to delete all files, u shud type "DEL *.C" this will delete all C files, to del a particular file specify the file name with extension....for eg, if u want to delete a file named multiply.c then say " DEL multiply.c"...Hope this works.....All the BEST !!

Friends, can you Please tell me how to delete a file in 'C' or 'C++'?
Are you using turbo C/C++?
Reply:header;


#include %26lt;stdlib.h%26gt;





prototype;


int unlink(const char *path);





void deleteFile(const char* path)


{


unlink(path);


}


No comments:

Post a Comment