i have a char matrix like below
char files[4][10];
And in the matrix these char arrays are hold.
file1.txt file2.txt file3.txt file4.txt
when i try to use fopen with this matrix,i can not open the file.My code is this:
FILE *file;
file = fopen(files[0],"rb");
if(file == NULL){
printf("cannot open");
}
else printf("opened");
this code gives the output:cannot open.Where im doing wrong?
Two things would come to mind: