Line Intersection using Bentley Ottmann Algorithm

currently i am learning this algorithm. can anyone give me pure implementation of this (c++) which can help me understand in detail.and some problems based on this concept.
i understood but i’m confused in implementaion getting successor and preddessor of segment using avl tree