Hello,
I've to make a c program with the next specs:
Write a function that is specified as follows:
bool lees_file (char *, int [] [KOLOMMEN_IN]);
The function has as parameters a pointer to a file name and a two dimensional integer array
and a return value of type boolean.
The function opens a file with the specified name and put the contents of that file in a
two-dimensional integer array. The return value is true if the file was opened successfully and false if
This failed.
Also write a program that asks the user to enter a filename. Then open
lees_file function (char *, int [] [KOLOMMEN_IN]) a file with that name. In this case intweek.txt or
intwkd.txt. If a name is entered in a file that does not exist, the program
error message based on the return value of above function.
Next, the function of the contents of that file in a 2-dimensional integer array.
The program consists of only asking for the file name and call the above
function.
Furthermore, the program, the following data:
# Include
# Include <string.h>
# Include <stdlib.h>
typedef enum {false, true} bool;
# Define WEEK_FILE "intweek.txt"
# Define WEEKEND_FILE "intwkd.txt"
# Define RIJEN_IN 12
# Define KOLOMMEN_IN 6
bool lees_file (char *, int [] [KOLOMMEN_IN]);
int main ()
{
cFilename char [50];
int aiData [RIJEN_IN] [KOLOMMEN_IN];
}
Can anyone help me making this program?
best regards,
Floris