bash array

C++
# create an array - just assign first value
arrayname[0]='VALUE'

# define an array
declare -a arrayname=(element1 element2 element3)

# get array element at index 
${arrayname[2]}

# get all array elements
${arrayname[@]}

# get array length
${#arrayname[@]}#to create an array:
$ declare -a my_array
#set number of items with spaceBar seperation:
$ my_array = (item1 item2)
#set specific index item:
$ my_array[0] = item1vals=($(seq 0 0.1 2.5))
Source

Also in C++: