C++ -> Find operator in map for objects

Revision en1, by OneClickAC, 2017-02-12 20:22:13

Hi , I was going through this problem on SPOJ (http://www.spoj.com/problems/NSTEPS/) , where I was basically trying to practice OOP concepts in c++ . You can see in my code (http://pastebin.com/qubfkgEr) that I defined a point object and also defined a comparing operator for it but when i was running the code on sample tests , find operator in map is not working properly or basically I should say that since I am a newbie to these advanced features of C++ , I am , may be not using comparator function properly . Can anyone help me out to sort this problem .??

If possible , Please also tell me how to tackle this problem in java if some time I encounter it there..

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English OneClickAC 2017-02-12 20:22:13 716 Initial revision (published)