Arrays are often used. They were used in C language and later in C #. Now I will go back and learn C language. I will summarize several forms of arrays defined in C language:
Arrays are often used. They were used in C language and later in C #. Now I will go back and learn C language. I will summarize several forms of arrays defined in C language:
Taking a one-dimensional array as an Example
Int arr [10];
Int arr [] = {1, 2, 4 };
Int arr [10] = {1, 2 };
Int * arr = new int [10];
The first three methods can be used frequently, but you need to pay attention to them when using the fourth method. Compiling in the. c file in this form will fail, but the. cpp file is acceptable. It can be inferred that this is an extension of C ++ to C.
The above conclusions are entirely based on the practices in the Visual Studio environment. Whether tc, bdc, and gcc are established remains to be verified.