How do you sort a list of objects based on there properties? : #I'm trying to sort a list of objects based on their Ids.
 
When I create a funtion that compares the Id of to objects in a list, It gets the error: Severity	Code	Description	Project	File	Line	Suppression State
Error	C3867	'BobControl::compareId': non-standard syntax; use '&' to create a pointer to member	list.sort	c:\users\wil\documents\visual studio 2015\projects\list.sort\list.sort\source.cpp	32	

This code was used to test the issue.  

     #include <iostream>
        #include <list>
        #include <string>
        using namespace std;
        
        
        
        class Bob {
        public:
        	Bob::Bob(int id) {
        		_id = id;
        	}
        	int getId() const { return _id; }
        	
        
        private:
        	int _id = 0;
        	
        };
        
        
        
        //testing lists
        class BobControl {
        public:
        	
        	bool compareId(const Bob& first, const Bob& second)
        	{
        		return (first.getId()  < second.getId());
        	}
        	void testCompar() {
        		bobs.sort(compareId);
        	}
        
        	void controlBobs() {
        		list<Bob>::iterator lit;
        		bobs.push_back(Bob(0));
        		bobs.push_back(Bob(1));
        		bobs.push_back(Bob(5));
        		bobs.push_back(Bob(3));
        
        		testCompar();
        
        
        		for (lit = bobs.begin(); lit != bobs.end(); lit++) {
        			cout << (*lit).getId() << endl;
        		}
        	}
        private:
        	list<Bob> bobs;
        
        
        };
        
        
        

        
        
        
        
        int main() {
        	
        
        	
        
        	BobControl bobc;
        
        	bobc.controlBobs();
        	
        	
        
        
        	system("PAUSE");
        
        
        
        	return 0;
        }