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

C# random value from dictionary and tuple -

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -

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