I wrote this small employee bonus calculation program (pretty easy), but I am getting an error message "(39) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data"
The error message seems to be happening when I use the = sign to determing the bonus calculation.
Any suggestions would be greatly appreciated, as I am about to pull my hair out!
You declared empBonus as an int, right? However, you multiply empSalary by a double (.01), making the result a double. You then try to assign that result to an int. This can cause data loss, such as 42.99 turning into 42 because int doesn't have decimals. You should turn your variables into double if you want to do this.