<p>What is the best way to convert a fixed length string array to a fixed lengh integer array in C++ ?</p>

This will copy an array of characters into an array of ints:
```
```
#include <algorithm>
char foo[9] = "asdfasdf";
int bar[9];
std::copy(foo, foo+9, bar);
```
```
std::copy
This assigns the values of a null terminated character array {'a', 's', 'd', 'f', 'a', 's', 'd', 'f', '\0'} to an integer array, yielding {97, 115, 100, 102, 97, 115, 100, 102, 0}.  Note that this includes the null termination of the original string.
This will parse an array of strings, and put their integer values into an array of ints:
```
```
#include <algorithm>
#include <sstream>
#include <string>

template <class T>
T parse(const std::string& str)
{
    T temp;
    std::istringstream iss(str);
    iss >> temp;
    if(iss.bad() || iss.fail())
    {
        // handle conversion failure
    }
    return temp;
}

...

std::string foo[3];
int bar[3];
foo[0] = "67";
foo[1] = "11";
foo[2] = "42";

std::transform(foo, foo+3, bar, parse<int>);
```
```
std::transform
This will transform each of the strings in the array foo into ints, and place them in the array of ints, bar.