Why do I have a syntax error in this line ?
I think that everything is correct
fMaxElem = fabs(double pfMatr[k*nDim + k] , int k); // error C2059: syntax error : ')'
m = k;
for(i=k+1; i<nDim; i++)
{
if(fMaxElem < fabs( double pfMatr[i*nDim + k], int k) )//error C2143: syntax error : missing ';' before '{'
{
fMaxElem = pfMatr[i*nDim + k];
m = i;
}
}
This line: fMaxElem = fabs(double pfMatr[k*nDim + k] , int k); and this line: if(fMaxElem < fabs( double pfMatr[i*nDim + k], int k) ) are completely wrong because
you are trying to call a function - but you have written it like a function declaration.
Do you understand the difference between a function declaration and a function call?
But I tried like this
fMaxElem = fabs(double pfMatr[k*nDim + k]
if(fMaxElem < fabs( double pfMatr[i*nDim + k], int k) )
and gives me
error C2064: term does not evaluate to a function taking 1 arguments
How do they call the functions in the tutorial ? : addition (5,3);
You're trying to somehow redeclare the type of the parameter, something like this: addition (int 5,int 3);
See what's wrong?
On the other hand, fabs() takes only one parameter : http://www.cplusplus.com/reference/clibrary/cmath/fabs/