Hello,
How to make a program in C to create a product inventory file containing pro0duct name, cost and quantitity and then read the prouct inventory file.
?
Hello,
How to make a program in C to create a product inventory file containing pro0duct name, cost and quantitity and then read the prouct inventory file.
?
I always love when the demand for work is done with an angry face! Makes me laugh everytime.
Virtual reality hello world http://www.rodneybrothers.com/vr/vrh...rld/index.html in html and javascript.
Viewable with dodocase, google cardboard, OR, and other compatible VR gear.
Code:int main(void) { // Write inventory file FILE *f = fopen("inventory.dat", "w"); if (f == NULL) return(EXIT_FAILURE); fprintf(f, "%s\n", "pro0duct name"); fprintf(f, "%s\n", "cost"); fprintf(f, "%s\n", "quantitity"); if (fclose(f) == EOF) return(EXIT_FAILURE); printf("Inventory file successfully written.\n"); // Read inventory file char buf[1000]; FILE *g = fopen("inventory.dat", "r"); if (g == NULL) return(EXIT_FAILURE); printf("Reading inventory file:\n"); while (fgets(buf, 1000, g) != NULL) { printf("%s", buf); } if (fclose(g) == EOF) exit(EXIT_FAILURE); printf("Inventory file successfully read.\n"); return EXIT_SUCCESS; }
error: undefined symbol EXIT_SUCCESS, EXIT_FAILURE
ok... please write the input "piece" of code where the user write data with respect to product name, cost, quantity etc and it save in the file inventory.dat
i LOVE how after you post this....
he responds with
i hope THIS GUY works for me someday!!! i would have a blast with him...then of course fire him!
HEY shansajid, how long till you graduate? (stupid question i know, he will be a drop out soon!!!)
Yeah, he wins the blatant "do it for me, sucker!" post for this month. LOL!
no problem......................