请帮助我理解我的代码的第一行有什么问题,它在公开之前一直说出预期的不合格ID。
public class LinearRegressionModel extends RegressionModel {
/* The y intercept of the straight line */
private double a;
/* The gradient of the line */
private double b;
...
}
错误:
[Error] expected unqualified-id before 'public'
答案 0 :(得分:0)
只是一件小事:用错误的语言写的! C ++看起来更像是这样:
class LinearRegressionModel : public RegressionModel {
private:
double a;
double b;
...
public:
/* public stuff here */
}