c++ - Granting permission/ deleting files which need admin permission -


i have started coding c++ , wondering how can delete file/grant user sufficient permission delete file. instance, deleting windows file.(wanting know educational purposes)

i have tried deletefile() , std::remove, whenever running such code, "access denied". there (easy) ways force delete such files though account classified "administrator"?

deletefile("filepath"); std::remove("filepath"); 

code meant windows 7 , upwards


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -