Can anyone tell me what is wrong with this code?
#include <iostream>
#define MATRIX_DIMENSION 4
int main(int nArgs, char** pArgs)
{
int nDim = MATRIX_DIMENSION;
double fMatr[MATRIX_DIMENSION*MATRIX_DIMENSION] =
{
1.0, 2.0, -1.0, -2.0,
1.0, 3.0, -1.0, -2.0,
2.0, 1.0, 1.0, 1.0,
3.0, 1.0, 2.0, 1.0,
};
double fVec[MATRIX_DIMENSION] = {-6.0, -4.0, 11.0, 15.0};
double fSolution[MATRIX_DIMENSION];
int res;
int i;
res = LinearEquationsSolving(nDim, fMatr, fVec, fSolution); // !!!
if(res)
{
printf("No solution!\n");
return 1;
}
else
{
printf("Solution:\n");
VectorPrint(nDim, fSolution);
}
return 0;
}