language: C++ 4.7.2 (gcc-4.7.2)
date: 408 days 6 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
class EntityCollection
{
public:
    typedef std::list<Entity*> EntityList;
    typedef EntityList::iterator iterator;
 
    EntityCollection(EventType event){
        EventSystem::listenToEvent(event, this);
    }
 
    ~EntityCollection(){
        clear();
    }
 
    void onEvent(Entity* entity){
        mQueue.push_back(entity);
    }
 
    bool emtpy() const{
        return mQueue.empty();
    }
 
    iterator begin(){
        return mQueue.begin();
    }
 
    iterator end(){
        return mQueue.end();
    }
 
    void clear(){
        // Delete entities.
    }
 
private:
    EntityList mEntities;
};
prog.cpp:4: error: ISO C++ forbids declaration of ‘list’ with no type
prog.cpp:4: error: typedef name may not be a nested-name-specifier
prog.cpp:4: error: expected ‘;’ before ‘<’ token
prog.cpp:5: error: ‘EntityList’ has not been declared
prog.cpp:5: error: ISO C++ forbids declaration of ‘iterator’ with no type
prog.cpp:5: error: typedef name may not be a nested-name-specifier
prog.cpp:5: error: expected ‘;’ before ‘iterator’
prog.cpp:7: error: expected `)' before ‘event’
prog.cpp:15: error: ‘Entity’ has not been declared
prog.cpp:23: error: ‘iterator’ does not name a type
prog.cpp:27: error: ‘iterator’ does not name a type
prog.cpp:36: error: ‘EntityList’ does not name a type
prog.cpp: In member function ‘void EntityCollection::onEvent(int*)’:
prog.cpp:16: error: ‘mQueue’ was not declared in this scope
prog.cpp: In member function ‘bool EntityCollection::emtpy() const’:
prog.cpp:20: error: ‘mQueue’ was not declared in this scope