0

I have a class called Video and is defined as the following:

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;
};

If i have the above in a fresh file called Video.h the build works fine, however when i declare the above in an existing file containing a number of classes the build fails with errors such as

../../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

Ideally i would like the Video class within the file with subclasses, can someone please explain why one causes a build error and the other doesn't?

Mat
  • 202,337
  • 40
  • 393
  • 406
godzilla
  • 3,005
  • 7
  • 44
  • 60

1 Answers1

0

I just simply put the video class in an independent file and all started to work fine

godzilla
  • 3,005
  • 7
  • 44
  • 60