Thread: Hi.. everyone~~

  1. #1
    Registered User
    Join Date
    Jul 2011
    Posts
    16

    Hi.. everyone~~

    i just facing this kind of problem..
    warning C4244: '=' : conversion from 'double' to 'float', possible loss of data

    how to overcome this problem?
    would this problem affect my program??

    thx and regards...

  2. #2
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    *nullptr
    Posts
    2,657
    would this problem affect my program
    If you wanted doubles instead of float, yes.
    how to overcome this problem?
    Without seeing your code, guessing that you've to change the variable you're assigning to, to a double.

  3. #3
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,738
    Quote Originally Posted by Vinsento View Post
    how to overcome this problem?
    Make an explicit cast, use float instead of double or double instead of float!

    Quote Originally Posted by Vinsento View Post
    would this problem affect my program??
    Well, there always stands the possibility of precision loss, just as the warning indicates.
    Devoted my life to programming...

Popular pages Recent additions subscribe to a feed