I want to delete file from my program. Trying to use this function but still fail;
#include<stdio.h>
DeleteFile(L"c:\c.png");
What is the correct way?
Escape the \
;
DeleteFile(L"c:\\c.png");
DeleteFile
works.
Try,
DeleteFile("c:\\\c.png"); // 2 slashes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With