int fr[10]{}
I seen this declaration in C++ is this 1-D array or it is 2-D. Which type of declaration it is?
int fr[10]{}
I seen this declaration in C++ is this 1-D array or it is 2-D. Which type of declaration it is?
C++ since its version 11 has introduced in its standard the use of curly brackets for the initialization of objects.
Here are some examples:
MyObjects obj {};
MyObjects obj {firstParameter};
int array[10] {};
In the latter case, it refers to the fact that it will contain 10 elements initialized as zero in it. In the case of the standard types you will see what was written in the memory cell first