此浏览器不再受支持。
请升级到 Microsoft Edge 以使用最新的功能、安全更新和技术支持。
备注
访问此页面需要授权。 可以尝试登录或更改目录。
访问此页面需要授权。 可以尝试更改目录。
只使用常量表达式在数组中编制索引。
C++核心准则边界.2
int getSomeIndex(); void function(int* p, int count) { p[getSomeIndex()] = 0; // C26482, Only index into arrays using constant expressions }
此页面是否有帮助?
Need help with this topic?
Want to try using Ask Learn to clarify or guide you through this topic?