CPP Array

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2023 Apr 25 7:16
Editor
Edited
Edited
2023 Apr 25 17:7

Constant Pointer

C++ will let you go beyond range
  • Unpredictable results
  • Compiler will not detect these errors
Fills rest with zero of array base type if fewer values than size supplied
Indexed variable handled same as simple variable of array base type
 

Standard Array is fixed size

 
 
 

3 pieces of array

because it is allocated back to back
  • Address of first indexed variable
  • Array base type
  • Size of array
So if length is 1, it is similar to
CPP Reference Type
 

Dynamic Array

Array type NOT allowed as return-type of function, so use * is legal
 
 
 
 
 

Recommendations