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

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

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