Hi, I seem to have a pointer problem in my code(bold) and i hope someone can explain as well as help me fix this problem.
Error
21: Fehler: request for member 'draw' in '* it.__gnu_cxx::__normal_iterator<_Iterator,
_Container>::operator-><city**,
std::vector<city*> >()',
which is of pointer type 'city*'
(maybe you meant to use '->' ?)*it->draw(scene);
^
city.h:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#ifndef CITY_H
#define CITY_H
#include "ui_mainwindow.h"
#include "mapobject.h"
class city : public MapObject
{
public:
city(float x,float y);
virtualvoid draw(QGraphicsScene* scene);
private:
float x;
float y;
};