September 6th, 2011, 04:14 AM
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:
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:
if(err = WFS_init (instr.selected_id, &instr.handle))
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 04:17 AM.
September 6th, 2011, 04:51 AM
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
Click Here to Expand Forum to Full Width