okay~ i have searched for this question ,but the ans always solved C++ or C#
i want to fopen ("C:\\myfile.txt","w");
it will permission denied .
how can i compile a C program can run as admin without any manual setting?
i'm using wxDEV-C++ 7.4.2.
any ideas ?
/* fopen example */
#include <stdio.h>
int main ()
{
FILE * pFile;
pFile = fopen ("C:\\myfile.txt","w");
if (pFile!=NULL)
{
fputs ("fopen example",pFile);
fclose (pFile);
}
return 0;
}
first , thx lurker fixed my poor English title . its a big help.
sec, what i mean is a program can trigger UAC pop out ,then user can just give a single click to agree to run as admin,so user won't need to right click run as admin.
thx SoronelHaetir had solve my question .