Code:
class Bomb
{
public:
Bomb(Player &_host, Map &_map, vector <Bomb> &_bombs)
{
...
bombs = &_bombs;
}
...
vector <Bomb> *bombs;
void do_flames(const short coord, const short t, const bool xy)
{
short _x = x, _y = y;
bool stop;
tile mapt;
for(int dir = 0; dir < 2; dir++)
for(int i = coord;;)
{
...
else if(isbomb(mapt))
for(size_t n = 0; n < bombs->size(); n++)
if((_x == bombs[n]->x) && (_y == bombs[n]->y))
{
bombs[n]->timer = 0;
break;
}
}
}
...
};
Results to:
[code]
G:\source\bombo>gxx main.cpp -lalleg -Wall
main.cpp: In member function `void Bomb::do_flames(short int, short int,
bool)':
main.cpp:254 (bombs[n]->x): base operand of `->' has non-pointer type `std::vector<Bomb,
std::allocator<Bomb> >'
main.cpp:254 (bombs[n]->y): base operand of `->' has non-pointer type `std::vector<Bomb,
std::allocator<Bomb> >'
main.cpp:256 (bombs[n]->timer): base operand of `->' has non-pointer type `std::vector<Bomb,
std::allocator<Bomb> >'
[/code}