I am having trouble opening file.
[code]
// when file location is passed as an argument on command line
/(1)
FILE *fp;
fp = fopen(argv[2],"r");
// where argv[2] holds the file location
// this operation works for me
BUT
//(2)
FILE *fp;
char *filename;
filename="dic.f" // where dic.f is an actual file with correct permissions
fp=fopen(filename,"r");
//my problem is that fp==NULL, even though when i put 'dic.f' in (1) it works fine.
[code]
Where is my problem??