Good day. I was having a hard time to input the values in the SGESV function. So far, I have this kind of code:
1 2 3 4 5
//Solve linear system matA2 * X = vecB2
int nrhs = 1;
int* ipiv = newint[count_g_polCoeffGerald];
int info;
sgesv_((integer*)&count_g_polCoeffGerald, (integer*)&nrhs, (real*)matA2, (integer*)&count_g_polCoeffGerald,(integer*)ipiv, (real*)vecB2, (integer*),(integer*)&count_g_polCoeffGerald,(integer*)&info);
However, I get errors for "matA2" and "vecB2". The systems says:
no suitable conversion function from "std::vector<float,std::allocator<float>>" to "real *" exists
My question is, before when I was using basic arrays, there's no problem using the syntax I have above, but when I used std::vector, the problem started to occur. Do I have to switch back to basic arrays (not dynamic arrays)? Or I can still use std::vector? If I can use std::vector, how should I probably input the values in the SGESV?