M
Mike
Hi,
I'm trying to create a C function that will read a text file but I keep
getting fopen() = NULL
I've tried my own code and when that didn't work I tried code off various
websites and they keep giving the same result.
The file was created in notepad, saved as a .txt and contains only "abcd"
without quotes.
Only thing I can think of is that the program doesn't have rights to access
the file....possibly because it's Vista? But nothing turns up after
searching.
The code is written:
FILE *fp;
fp = fopen( "C:\Users\<Username>\Documents\R.txt", "r" );
Is there anyway to find out why it can't open the file?
Cheers,
Mike
I'm trying to create a C function that will read a text file but I keep
getting fopen() = NULL
I've tried my own code and when that didn't work I tried code off various
websites and they keep giving the same result.
The file was created in notepad, saved as a .txt and contains only "abcd"
without quotes.
Only thing I can think of is that the program doesn't have rights to access
the file....possibly because it's Vista? But nothing turns up after
searching.
The code is written:
FILE *fp;
fp = fopen( "C:\Users\<Username>\Documents\R.txt", "r" );
Is there anyway to find out why it can't open the file?
Cheers,
Mike