Some rather simple C++ question, I cannot understand this piece of C++ code

  c++

Sorry for this rather stupid question regarding this piece of C++ code, can anyone with C++ background explain to me the meaning of const T u[DESCRIPTOR::d] and const T pi[util::TensorVal<DESCRIPTOR >::n] of the input of this function? Are u and pi object arrays whilst DESCRIPTOR::d and util::TensorVal::n indices of the array? then why in the function they can call u and pi directly?

void Dynamics<T,DESCRIPTOR>::iniRegularized(
  Cell<T,DESCRIPTOR>&cell,
  T rho,
  const T u[DESCRIPTOR::d],
  const T pi[util::TensorVal<DESCRIPTOR >::n])
{
  T uSqr = util::normSqr<T,DESCRIPTOR::d>(u);
  for (int iPop=0; iPop<DESCRIPTOR::q; ++iPop) {
    cell[iPop] = computeEquilibrium(iPop, rho, u, uSqr) + firstOrderLbHelpers<T,DESCRIPTOR>::fromPiToFneq(iPop, pi);
  }
}

Source: Windows Questions C++

LEAVE A COMMENT