# classname_fieldname_at(vector)

> This function returns a reference to an element of a vector at specified position.

### Prototype

>         MCO_RET	classname_fieldname_at(	/*IN*/ classname *handle,
>                               /*IN*/ uint2 index,
>                               /*OUT*/ <type> *result );

### Arguments

handle | A pointer to a classname handle
index | A `uint2` that specifies the offset from the start of the vector from which to get the value
result | A `<type>` pointer to receive the value of the element of the vector at a specified index

### Description

> This function returns a reference to the element of a vector at a specified position. This method is used for vector elements that are NOT char or string elements. See classname_fieldname_at (2) for char and string vector elements.

### Return Codes

MCO_S_OK | The value was put successfully
MCO_E_INDEXLIMIT | Index is out of range
MCO_E_TRANSACT |
MCO_ERR_OBJECT_HANDLE |

Related Topics