I want to implement RRT for motion planning of a robotic arm. I searched a lot on the internet to get some sample code of RRT for motion planning, but I didn't get any. Can someone please suggest a good source where I can find RRT implemented in C++ for any type of motion planning.
The OMPL library has some good quality implementations of several sampling-based motion planners, as listed here : http://ompl.kavrakilab.org/planners.html
In particular, you can find several variants of RRT under the BSD license.
The first hit on GitHub gives me the following implementation, which is what you seem to be looking for.
You can follow this GitHub repository to find RRT, RRT* and RRT with dynamic vehicle constraints (Dubin's dynamics).
It has a simple codebase to learn the implementation in C++ and modify as per your requirement.