Hi, I wrote a function as part of a homework assignment, but all it seems to be outputting is 1.#QNAN (I know what this is, I just can't find the cause of it). Here is the function:

```
double length ( const int a[], int size )
{
double length = 0;
for ( int i = 0; i < size; i++ )
{
length += pow((double)a[i],2);
}
length = sqrt( length );
}
```

I figure its a stupid mistake, but I just don't see it. Thanks beforehand for an answer!