어이가 함께 잘 작동는 GCC와 클래스를 컴파일
dining.h:7:1: error: unknown type name ‘class’
dining.h:7:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
필자는 구문 오류 듣고으나 필자는 클래스를 만들어 내가 컴파일 할 때이 오류가 있는지 확실하지 않습니다 모든 메신저 .... g ++하지만 난 GCC를 사용할 필요가 ...
이 문제의 코드입니다 .. 그것은 C++ 프로그램의 이후 C.로 프로그램을 컴파일에
#ifndef DINING_H
#define DINING_H
class DiningSet {
public:
DiningSet();
~DiningSet();
void getSize(); // accepts X and Y dimentions of the table (in metres)
//void surfaceArea(int,int); // Calculates Surface Area of table (in square metres)
void numChairs(); // accepts number of chairs
void cushionColour(); // accepts a cushion colour
void woodType(); // accepts wood type
void priceComp(); // computes a price of set
void purchaseDet(); // displays details of purchase
void purchasePrice(); // displays price of purchace
private:
int X, Y; // Dimentions of table
float Surface;
int chairs; // Number of chairs
char colour; // colour of cushion (should be dynamic array)
char wood;
float totalPrice;
};
#endif
현재 사용중인 명령 줄을 표시하십시오. –