including own class instead of interrior class

I want to use FREAK(an opencv key-point descriptor library),
generally speaking,
a source file which exist in opencv or vc++,
on the other hand i need to include the same header file to use the other functions, and when i use that source file i get "ambiguity error" how can i select to use that function from my current directory instead of interior function?
thank you so much for your help
This is exactly what namespaces are for. If you make sure your class is in a different namespace from the opencv class, you can specify which one to use when it's called.
yes, i did what you say, but the problem is that i get this error:

object of abstract class type "mycv::FREAK"is not allowed

what shall i do?
Is mycv::FREAK abstract?

If so, you can't instantiate it. That's the whole point of abstract classes - you can't instantiate them. You have to instantiate a subclass that implements all the virtual methods declared in the abstract class.
To be more precise, i used to use "cv::FREAK" as normal.
in my main, i had:
main()
{
cv::FREAK var;
var.compute(in, out);
}
and it worked,
but now i have "mycv::FREAK var;" instead.

in fact, i want to trace that code(it's a open-source library and at the same time exist in interior functions), so i download it and change my code a bit to do that,

what's the logical strategy to do it?
thank you so much for your help
None of that has anything to do with what I wrote.

Since you didn't bother to answer my question the first time, I'll ask it again:

Is mycv::FREAK an abstract class?
sorry dear,
yes, it's an abstract class
and full of virtual functions

so, now is there a solution for that?
Well, like I said - you can't instantiate an abstract class. You have to instantiate a class that derives from it, and implements all the methods.

Why did you write it as an abstract class, if you wanted to instantiate it?
actually, i haven't written this code,
it's an open source library which exist in opencv library ,
now i download the code and want to use this version instead of that built in version.

how can i use it?
how can i use it?

For the third time:

You have to instantiate a class that derives from it, and implements all the methods.


If this is a third-party library, then, presumably, there is some documentation for it. Read it.
take it easy man,
ok, i got it,
thanks anyway
Topic archived. No new replies allowed.