我的头文件中的Private类出错了。它说"期待一个;"。任何帮助都会受到赞赏,因为我是c ++的新手。
部首:
#ifndef CONEMODEL2
#define CONEMODEL2
#include <iostream>
#include <string.h>
using namespace std;
class Cone
{
public:
Cone(void);
Cone(double aLength, double aBigRadius, double aSmallRadius, double aHeight);
~Cone();
void setCone(double aLength, double aBigRadius, double aSmallRadius, double aHeight)
double getCone(void);
double calculateArea();
double calculateVoume();
double displayTheArea();
double displayTheVolume();
private:
double theLength;
double theHeight;
double bigRadius;
double smallRadius;
};
答案 0 :(得分:0)
简单的拼写错误:
void setCone(double aLength, double aBigRadius, double aSmallRadius, double aHeight);
// Semicolon! ^