// file: $(ECE_1111)/labs/01/l01_03/myprog.cc // // local include files // #include "myprog.h" #include // main: myprog // // This is a driver program that does some very simple things. // int main(int argc, const char** argv) { // declare a variable for status // int status = (int)0; short int buf = 3; FILE* fp = fopen(argv[1], "w"); if (fp == (FILE*)NULL) { fprintf(stdout, "help....\n"); } fprintf(fp, "My name is Joe\n"); long nitems_read = fread(&buf, sizeof(short int), 27, fp); fclose(fp); // exit gracefully // return(status); }