내 Xcode 프로젝트 내에서 C++ 클래스를 구현하기 위해 노력하고있어하지만 난 다음 오류 받고 있어요 의미 :엑스 코드 : C++ 오류 : 알 수없는 유형 이름 '클래스'한 당신은 '클래스'
Expected ';' after top level declarator
Unknown type name 'class'; did you mean 'Class'
을 이것이 내가하는 일이다. 나는 새로운 C++ 파일을 추가 해요 :
#ifndef DoingSomething_hpp
#define DoingSomething_hpp
#include <stdio.h>
class DoingSomething {
public:
static DoingSomething *instance();
int doSomething();
};
#endif /* DoingSomething_hpp */
그러나 : 나는 헤더 파일이 추가 해요 그 후
이#import "ViewController.h"
#import "DoingSomething.hpp"
@interface ViewController()
당신의 모든 이유를 알고 : 내의 ViewController에 DoingSomething.hpp를 추가 한 후 오류가 보여주는 시작 이 오류 또는 어떻게 해결할 수 있습니까 아니면이 문제를 해결할 수 있습니까?
정말 감사드립니다.
보기 컨트롤러가 objective-C++ 파일입니까? – dan
@dan, 내 viewController는 Objective-C 파일입니다. – user2924482