Results 1 to 3 of 3

Thread: Warning C4244: possible loss of data

  1. #1
    Join Date
    Jul 2009
    Posts
    124

    Warning C4244: possible loss of data

    warning C4244: 'argument' : conversion from 'double' to 'float', possible loss of data
    I am getting the above error message when I am trying to convert 'double' to 'float'. I tried typecasting but it did not work. Any help is appreciated.

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    Re: Warning C4244: possible loss of data

    This is obvious because you are trying to convert a higher level of datatype into lower which may lead you into data loss. This message tells you that the double holds larger amount of data then float can which might result you in data loss. If you still want to move further then it is better to use explicit typecasting.

  3. #3
    Join Date
    May 2008
    Posts
    685

    Re: Warning C4244: possible loss of data

    Basically with this warning, the compiler wants to tell you that since double handles 8 byte of data while float only handles 4 byte of data, the implicit conversion may result you in data loss. If you still want your variable or expression to convert to lower datatype, you need to explicitly mention the proper datatype for typecasting.

Similar Threads

  1. Want help to avoid data loss in HP touchpad.
    By Choo-Kheng in forum Portable Devices
    Replies: 6
    Last Post: 19-07-2011, 10:34 AM
  2. Need Help To avoid data loss while on net
    By Roger Zelazny in forum Networking & Security
    Replies: 5
    Last Post: 01-03-2011, 10:18 PM
  3. What are causes of data loss?
    By Frieda in forum Operating Systems
    Replies: 5
    Last Post: 18-02-2011, 02:53 PM
  4. What to do when Data Loss happens?
    By sivaranjan in forum Windows Software
    Replies: 6
    Last Post: 01-04-2010, 09:23 AM
  5. Data Loss on RAID
    By Ravi Singh in forum Operating Systems
    Replies: 3
    Last Post: 28-08-2009, 11:47 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,751,351,671.43390 seconds with 16 queries