Hi guys :)
I'm stuck with same compiler messages since yesterday, and thought it might be helpful to aks for help :)
The prog I'm developing is relatively big, so I'll post just snippets in order to describe what I'm doing.
So, I have a class with a few subclasses. After parsing a file line, an object of the particular subclass is generated and appended to a vector:
class Circle:public GeomElem{};
. . .
vector<Circle*> CircleElems;
CircleElems.push_back(new Circle(Center_, Radius_, ID_));
In the next step I have defined a functor to set a predicate for a find_if(), so I can look for a certain circle by its ID in the vector:
struct FindIDCircle{
private:
string SearchID_;
public:
FindIDCircle(string ID_) : SearchID_(ID_){}
bool operator()(Circle* findElem){
return findElem->ID == SearchID_;
}
};
After being ready with parsing the file lines and have generated all objects needed, I want to set a matrix to keep (e.g.) the center points of the circles. Therefore, I import the header of the file I fill the public circle vector and
int matrixSize(ParserDVG::NodeElems.size());
And I get the same 2 errors for a day now:
error C2440: '<function-style-cast>' : cannot convert from 'std::string' to 'ParseFile::FindIDCircle'
error C2228: left of '.size' must have class/struct/union
Does anyone have any idea? I'm close to desperation :(
Thanks in advance.