#include <set>
#include <string>
using namespace std;
struct StudInfo{ //declaration of structure
string name;
int id;
};
int compareID(StudInfo a , StudInfo b){ //Compare function as a parameter
if(a.id == b.id) return 0; //that is being passed to the set s
if(a.id < b.id) return -1;
else return 1;
}
int main(){
set<StudInfo> s(CompareID);
return 0;
}
Inside the main() scope I am getting this error (error C2065: 'CompareID': undeclared identifier) Although this same code was successfully compiled in the video lecture in which this code was written Please help.