开发者

Convert int32 to int

I need to convert int32 to int in VS2008 C++ CLI?

开发者_JS百科

How is this done?


The C++/CLI keyword int is an alias for System.Int32. No conversion or casting is necessary.


Just use a cast:

int32 a = ...;
int b = (int) a;

Note that in principle this might lead to problems if you're running on a platform where int is less than 32 bits, but that's unlikely if it's a program for Windows.


int value = (int) int32value;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜