Hi y'all, I'm new to C and to this community so kindly bear with me.
I need to open a txt file using C(only).The thing is I'm able to open it if it is directly inside a drive partition(D:\), but if it is inside a folder then its not opening.
Here's my code:
/* directly inside drive D:\ */
fp1=fopen("/cygdrive/d/profile.txt","r");
while (feof(fp1)==0)
{
fscanf(fp1,"%f %f",&inlet_a[1],&outlet_a[1]);
}
fclose(fp1);
/* inside a folder in drive D:\ */
fp1=fopen("/cygdrive/d/NACA2412/profile.txt","r");
while (feof(fp1)==0)
{
fscanf(fp1,"%f %f",&inlet_a[1],&outlet_a[1]);
}
fclose(fp1);
P.S: I'm using netbeans 6.9.1