-2

以下代码块生成了错误

rating* TrustManager::initNewRating(double alpha, double beta, double fading)
{
   rating* rating = new rating(1.0, 1.0);
   rating->updateRating(alpha, beta, fading, 1);
   return rating;
}

错误是

error: expected type-specifier before ‘rating’
error: cannot convert ‘int*’ to ‘rating*’ in initialization
error: expected ‘,’ or ‘;’ before ‘rating’
4

1 回答 1

1

编译器不知道rating。#包括它...

于 2013-04-15T09:10:55.803 回答