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;
      }
    }

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;
}
}

Leave off the "int" and "double" in the function call:

fMaxElem = fabs(double pfMatr[k*nDim + k] , int k); // error C2059: syntax error : ')'

Delete the words in red. "double" and "int" belong in function declarations, not function calls.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.