Hi all,
it seems that every time that I try to run this code it come up with an error stating that the 'fulltotal' and 'fullinput' are not initialized and I am not sure why.
Any help would be great, thank you.
double fullcases, fullservings, fullliters,fullinput, fulltotal, fullgallons, bottles, fullpallets;
bottles = (.5 / 16) * 1960;
fullservings = fulltotal * 1920; // what value does fulltotal have here?
fullliters = 1920 * fullinput; // what value does fullinput have here
In the tradition of the C language, in C++ there's no implicit initialization for built-in data types, such as the double's in your case.
So unless you explicitly initialize them, they will have garbage value.
1 2 3
double d = 90.0; // initialization (declaration and given value)
d = 85.5; // assignment