memset to INT_MAX in C++ [duplicate]

99封情书 提交于 2019-12-01 15:02:45

The second parameter to memset() is a single byte. memset() does not fill the specified area of memory with ints, but with single bytes.

If you want to initialize your board array of ints, you'll have to do it with the same kind of a loop that your test program uses to print its contents.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!