c - Open file in a different directory -


i have simple task. have open file in directory. have .c file in src, when compile move programs (a.out) in bin directory. want read file in directory asset. these folders in main folder.

if this

file* fp = fopen("../asset/team_list", "r"); 

it won't open file. why can't open file in directory?

guess forgot put extension of file

file* fp = fopen("../asset/team_list.doc", "r"); 

Comments

Popular posts from this blog

.htaccess - htaccess convert request to clean url and add slash at the end of the url -

php - facebook and github login HWIOAuthBundle and FOSUserBundle in Symfony2.1 -

hadoop - Sqoop installation export and import from postgresql -