#include <windows.h>
#include <stdio.h>
#include <string.h>
int main()
{
FILE *fp;
char filePath[255];
GetEnvironmentVariableA("USERPROFILE", filePath, sizeof(filePath)/sizeof(char));
strcat(filePath, "\desktop\txt1.rtf");
fp = fopen(filePath, "r");
if(!fp)
{
perror("n");
exit(-1);
}
fclose(fp);
return 0;
}