Hi,
I would like to define a macro that returns 0 if it cannot open the file and returns 1 if it opens the file.
For example;
#define OPEN(fileHandle) (fileHandle = fopen("blah.dat", "r"
)
I would like to use conditional logic but not sure of how to go around it. In this case, the return value of OPEN(fileHandle) would be 0 or 1
Your help will be appreciated.
I would like to define a macro that returns 0 if it cannot open the file and returns 1 if it opens the file.
For example;
#define OPEN(fileHandle) (fileHandle = fopen("blah.dat", "r"
I would like to use conditional logic but not sure of how to go around it. In this case, the return value of OPEN(fileHandle) would be 0 or 1
Your help will be appreciated.