-
September 6th, 2011, 03:14 AM
#1
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.
-
September 6th, 2011, 03:51 AM
#2
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|