Quote:
char *storage; // Create a storage container to store the answer from the user in fgets.storage=malloc(sizeof(MAXNAME)); // Allocate memory for the pointer just created with malloc// And have a string "storage" of size MAXNAME, orcompany *storage; // Create a storage container to store the answer from the user in fgets.storage=malloc(sizeof(company)); // Allocate memory for the pointer just created with malloc// And go through making sure that you are writing to the correct members in the structure.
I changed the malloc back to MAXNAME and that didn't help out at all. The below is still the same result. My understanding is the malloc simply allocates memory on the heap to be able to use so it shouldn't matter other than the amount of memory I am allocating whether or not I use MAXNAME (which is equal to 20) or company (which is equal to 112). As long as there is enough memory to hold the requests, isn't that correct?