Distance k from given node

please share this code … and tell me you write cin>>root then it takes only one value but how to make a tree with one input …please share the full code …

hello @vishal_sangal_123

we need to overload the >> opertor . are u aware of operator overloading?