Can we use ElementComparator type?


#1

Hello !

I would like to use ElementComparator& type in a function as a parameter.
However, I include “juce_ElementComparator.h” but during the compilation I have an error “No such file or directory”?

Visual C++ suggest that I can include this file… But I try to find them into my Juce Files and I do not find it?

Do you know where can come my problem…?


#2

Erm… you don’t have to include that file. All juce files get included when you include “juce.h”…


#3

I try to include just "juce.h"
But I have this error :

error C2061: syntax error : identifier ‘ElementComparator’

This is the synopsis of my function :
bool myFunction (ElementComparator & comparator);


#4

Sorry, I mis-read your post. ElementComparator isn’t a class, it’s a template parameter! I think maybe you need to go and learn about templates…


#5

Okay, I understand my mistake…
I will create a comparator and all its daugther class…

Thank you!


#6