This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

file handling

Hi,

I am unable to open a file in ccsv6.0 I have included the binary file in the same folder where main.c is present.

After fopen() the file pointer is holding NULL.

  • Hi,

    I am almost sure the default path is the output directory (either Debug, Release or a custom one), therefore you may be able to open the file if you copy it to the same directory as the .out file being executed.

    You can also set a hard coded path (C:\temp or something similar). That never failed for me.

    Hope this helps,

    Rafael

  • Hi,

    I copied the file in output directory(Debug) and I tried placing it every where in the workspace, evne then I am getting the same.

    The filepointer is having NULL (after having FILE *filepointer=fopen("blinky.bin","rb"));