This will cause the conversion error. fuel_required is of type int, but the calculation result is double. If you really want the loss of precision, you can cast the answer to an int to prevent the warning, by using static_cast<int>
However, you are probably better off making all the variables double as you can avoid the integer division trap without having to remember each time.
Also, some compilers don't have the conversion warning on by default. For example gcc, with -Wall -Wextra -pedantic on, still doesn't show this warning - it must be turned on manually with -Wconversion. Which means that you must have an explicit cast to prevent the warning.
There are others too, that for some might be handy: -Woverloaded-virtual -Wmissing-include-dirs -Wswitch-default -Wuninitialized -Wfloat-equal.
1. The messages are from compiler, not runtime.
2. Warnings are not errors.
3. First real error is "(35): error C2059: syntax error : 'else'". It probably causes the second warning and rest of errors too. The shown code does not explain that error.
I compiled every time. I just shut down VS and opened it back up and it worked, no warnings or errors. No code change or anything, and its been working fine since.
I compiled every time. I just shut down VS and opened it back up and it worked, no warnings or errors.
And which warning option do you have set? Just trying to get you into a good practice, the code you had earlier (now deleted) should produce a warning.