0
에서 나는 비디오라는 클래스를 가지고 다음과 같은 정의하지 : 내가 빌드 Video.h라는 새로운 파일에 위가 잘 작동하는 경우C++ 클래스는 범위
이class Video
{
public:
Video() { }
~Video()
{
}
unsigned int m_max_ad_duration;
unsigned int m_max_skippable_duration;
unsigned int m_start_delay;
unsigned short int m_inventory_type;
unsigned short int m_skippable_Request;
};
그러나 내가 선언 할 때 하나는 빌드 오류 및 발생하는 이유 이상적으로는 서브 클래스와 파일 내에서 Video 클래스를하고자하는 빌드는
../../include/CampaignCache.h:33:56: error: ‘Video’ was not declared in this scope
../../include/CampaignCache.h:33:62: error: template argument 1 is invalid
../../include/CampaignCache.h:33:62: error: template argument 2 is invalid
../../include/CampaignCache.h:33:64: error: template argument 2 is invalid
../../include/CampaignCache.h:33:64: error: template argument 5 is invalid
../../include/CampaignCache.h:33:89: error: invalid type in declaration before ‘;’ token
../../include/CampaignCache.h:97:51: error: ‘Video’ has not been declared
make[2]: *** [BaseOpenRTBBidRequest.o] Error 1
make[2]: Leaving directory `/home/asif/RTB3.0trunk/trunk/3.0/src/bidder/ssp/OpenRTB'
make[1]: *** [OpenRTB] Error 2
make[1]: Leaving directory `/home/asif/RTB3.0trunk/trunk/3.0/src/bidder'
make: *** [compile] Error 2
같은 오류와 함께 실패 클래스의 숫자를 포함하는 기존 파일, 위의 누군가가 설명해주십시오 수 있습니다 다른 사람은?
제대로 코드를 포맷하십시오 잘 작동하기 시작했다. – Arpit
순환 포함 문제처럼 보입니다. –
문제가 원형 포함으로 인한 경우 왜 경비원이 도움이되지 않는지 궁금해 할 때 (이 모든 것을 사용했다면) [이 Q & A] (http://stackoverflow.com/questions/14909997/whya-arent-my -include-guards-prevention-recursive-inclusion-and-multiple-symbol)은 여러분이 무슨 일이 일어나고 있는지 이해하는 데 도움이 될 수 있습니다. –