I have a 2D array holding data, and want a function that can extract a certain number of columns of data at a specific index.
template<typename T, int... columns>
void Data<T, columns...>::update(int index)
{
/*
// Iterate through each column given in template parameter
// Start at the least index and iterate to the highest index
*/
}
Where T is the type of data in the given columns, and columns holds the indices of the columns I want to extract. index is the given row of data at which to extract data.
The reason I have the columns as a template parameter is because the Data class is responsible for always extracting data at the same columns, but at different rows.
How would this be possible?