Ok heres the deal i was writing another simple program to calculate perimeter and i kept getting this runtim error that was "float not loaded" so i set set all the floats to 0.0 during initilazation. I was wondering what made that happen and why setting the floats to 0 stop it, also is it just a good thing to set variables as soon as you declare them if so should you even do it with like char arrays your planning on storing an inpuuted string in?
Second i get this warning "conversion from 'double' to 'float', possible loss of data" when i use this statement
BUT if i use this line of code it works with no warnings, whats going on here?
Second i get this warning "conversion from 'double' to 'float', possible loss of data" when i use this statement
- Code:
fltPerimeter = 2.0 * (fltWidth + fltHeight);
BUT if i use this line of code it works with no warnings, whats going on here?
- Code:
fltPerimeter = 2 * (fltWidth + fltHeight);