简体   繁体   中英

C2664 conversion error

I am a beginner in programming language and need your help. I have got codes from C language which is needed to be written into C++ MFC.

In C language I have codes like int32 float64 and when I put them into MFC application, they showed this error.

error C2664: cannot convert parameter 5 from 'float [1000]' to 'float64 []' 
error C2664: cannot convert parameter 7 from 'int *' to 'int32 *'

How do I convert from int32/float64 to just int/float type codes? Any kind help will do. Thank You

PS. May I know what is the * behind the int32* means??

As I know int32 means that it is a 32 bit integer, meaning 4 bytes.

If I were you I would have used the sizeof inbuilt function to check the size of int on your machine and then proceed from there.

http://en.wikipedia.org/wiki/64-bit#64-bit_data_models

if the sizes are equal on your machine then you can use static_cast to cast int32 to an int variable type.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM