Dear all, i created vector of vector and passed it to function now i want to access its values within function but it display an error error C2679: binary '+' : no operator found which takes a right-hand operand of type 'std::vector<_Ty>' (or there is no acceptable conversion)
template<typename T>
void chi_seq_calculations( T * contingency_table, int cardA, int cardB)
{
vector <int> marginal_sum_A(cardA+1, 0), marginal_sum_B(cardB+1, 0);
std::cout << "\n Table size is " << contingency_table->size();
for (unsignedint i = 1; i <= cardA; i++)
{
for (unsignedint j = 1; j <= cardB; j++)
{
//cout <<" \n function =" << contingency_table->size(;
marginal_sum_A[i] = marginal_sum_A[i] + contingency_table[i][j];
}
std::cout<< " \n marginal sum of A at " <<i<<" is = "<< marginal_sum_A[i];
}
}
All other steps are working very well even i can print the size of table vector within the function but i can not access elements. Please guide me how i can access elements of vector with in the function.