I'm using a program called Dev C++. Sometimes I am able to solve the syntax erros and sometimes I am not able to do so cause I do not understand it although it's logical.
There is an error message which displays "warning: assignment to 'int' from 'double'".
I had to write a program using 4 arrays that are passed into multiple functions. In my program I had to calculate Kilometers per liter and to calculate it I had to first convert miles to Kilometers and convert gallons to liter than dividing the two to obtain the km per liter. Miles and gallons are declared as int arrays and the constant km and liter are declared automatically as double using '#define' so any suggestions!!!!!!

>There is an error message which displays "warning: assignment to 'int' from 'double'".
That's not an error, it's a warning. It's telling you that the fractional part of a floating-point value will be truncated when you assign it to an integer variable. You fix it by using doubles instead of ints.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.