0
는 cdt.But 내 구조체 석회질 인식에 문제가있는 것 같습니다는 이클립스 CDT에 인식되지 않는 구조체 나는 일식에 의해 콘솔 기반 계산기를 쓰기 위해 노력하고 있어요
내 헤더 파일이 있습니다 :
#ifndef __CALC_H__
#define __CALC_H__
#include <iostream>
struct Calc {
Calc();
Calc(const Calc &other);
bool error;
int display;
char oper;
int result;
int memory;
void digit(int digit);
void op(char oper);
void equals();
void memPlus();
void memClear();
void memRecall();
bool isError() const;
void allClear();
};
std::ostream &operator<<(std::ostream &out, const Calc &c);
#endif
가
내 소스 파일
#include "calc.h"
void doOperation(Calc& calc){
switch(calc.oper){//ide tells me oper cant be resolved
case '+':
break;
case '-':
break;
case '*':
break;
case '/':
break;
}
}
void Calc(){
}
void Calc(const Calc& other){//ide tells me Calc does not name a type
}
그래서 문제가 1.oper은 내가 파라으로 석회질을 사용 Calc를 할수 있도록 팝업의 데이터 멤버로 인식되지 않을 수있다 미터, 일식 경사 유형을 찾으십시오. 어디서 잘못 했습니까? 미리 감사드립니다. void
반환 유형을 잃을 -
잃게됩니다. 구조체의 기본을 다루는이 자습서 http://www.cplusplus.com/doc/tutorial/structures/에 관심이있을 수 있습니다. –