Strange brackets in code I am reading

411 views Asked by At

What does it mean if I have in the middle of c++ code, things in brackets likt:

[..]

What do these brackets mean? is it cli?

2

There are 2 answers

0
CashCow On BEST ANSWER

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.

0
justin On

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`