开发者

Strange brackets in code I am reading

What does it mean if I ha开发者_JS百科ve in the middle of c++ code, things in brackets likt:

[..]

What do these brackets mean? is it cli?


This is probably in your code editor and the purpose is to allow you to see more "context" code. Thus if you close a block of code you see more of what follows underneath.


sorry in advance - not sure if this is too simple.

perhaps this is the subscript operator.

the primary use for this is to access a specific array element:

const int array[2] = {0,1};
const int value(array[0]); // access element 0 of `array`
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜