Hi everyone,
I don't know what the problem is here. I had this assignment to do using a text file!! Not much problem there. Now we have to use the same assignment, and change the text file to a binary file!! The file won't open!!
Can anyone tell m if I'm doing something wrong?
Code:
FILE * empfPtr;
empfPtr = fopen("employee", "rb");
if (empfPtr == NULL) {
  printf("cannot open %s file", argv[1]);
  exit(EXIT_FAILURE);
}
This is just part of the code. I just changed the mode from r+ to rb!! and everytime I run it, the "cannot open..." prints.
Anyone has an idea?
Thanks