how to crect the error
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: how to crect the error

  1. #1
    Join Date
    Aug 2011
    Posts
    21

    Wink how to crect the error

    Hi all .
    I want to ask a question. I wrote a program , but when compiling , it reminds there are something wrong with the following code:
    Code:
                      if(err = WFS_init (instr.selected_id, &instr.handle))
    		handle_errors(err);
    WFS_init () is one of the lib functions I used in the program and other lib functions are OK. What's more, the WFS_init() function also works well when I use it in other programs. the error is like this:
    Code:
    error C2664: 'WFS_init' : cannot convert parameter 2 from 'int *' to 'unsigned long *'
            Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or   function-style cast
    Last edited by Angela2010; September 6th, 2011 at 03:17 AM.

  2. #2
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: how to crect the error

    The error message is quite clear. You are converting a int-pointer to a unsigned long-pointer without safely casting it.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center