1
누락 나는이 다음 코드 :vtkStandardNewMacro 오류 C4430을 제공합니다 : 타입 지정자
오류 C4430를 :
#include <vtkInteractorStyleTrackballCamera.h> class InteractorStyle : public vtkInteractorStyleTrackballCamera { public: static InteractorStyle* New() {}; vtkTypeMacro(InteractorStyle, vtkInteractorStyleTrackballCamera); InteractorStyle() { cout << "test"; } virtual void OnLeftButtonDown(); virtual void OnKeyPress(); private: }; vtkStandardNewMacro(InteractorStyle); //error here void InteractorStyle::OnLeftButtonDown() { std::cout << "test"; // Forward events vtkInteractorStyleTrackballCamera::OnLeftButtonDown(); }; void InteractorStyle::OnKeyPress() { // Get the keypress vtkRenderWindowInteractor *rwi = this->Interactor; std::string key = rwi->GetKeySym(); // Output the key that was pressed std::cout << "Pressed " << key << std::endl; // Forward events vtkInteractorStyleTrackballCamera::OnKeyPress(); };
나는 tutorial, 그것은 항상
vtkStandardNewMacro(InteractorStyle);
에 대한 오류 아래에 나와 있습니다 따라 비록 실종 형태 지시자 - int가 가정된다. 참고 : C++은 을 지원하지 않습니다. default-int
해결 방법?
이 오류는 일부 헤더가 누락되었다는 것을 의미 할 수 있습니다. – AMA
@AMA 감사합니다. #include' –