Structs & Vector problem

Greetings,

so I have a problem doing this. It gives me these errors:
"IntelliSense: class "VendorRequirement" has no memeber "end""
"IntelliSense: class "VendorRequirement" has no memeber "clear""
"IntelliSense: class "VendorRequirement" has no memeber "begin""

Anyone who can explain why this is happening or give me a solution? It's 'copied' from another working example, so I have a hard time understanding what why "end", "clear" and "begin" aren't members of the vector.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
struct VendorRequirement
{
    VendorRequirement(uint32 _entry, uint8 _requirement_id, uint32 _extra)
        : entry(_entry), requirement_id(_requirement_id), extra(_extra){ }
    uint32 entry;
    uint8 requirement_id;
    uint32 extra;
};
typedef std::vector<VendorRequirement*> VendorRequirementList;

struct VendorRequirementData
{
    VendorRequirement m_VendorRequirement;
    void Clear()
    {
        for (VendorRequirementList::const_iterator itr = m_VendorRequirement.begin(); itr != m_VendorRequirement.end(); ++itr)
            delete (*itr);
        m_VendorRequirement.clear();
    }
};


Thanks.
Last edited on
VendorRequirement m_VendorRequirement; this is not a vector it is a VenderRequirement maybe you meant VenderRequirementList m_VenderRequirement;
I'm such an idiot. Thank you, I have been stuck on this for an hour. Can't believe it was such a simple fix. Once again, thank you.
Topic archived. No new replies allowed.