Nodes At a Distance K in a Binary Tree

My code is : https://ide.codingblocks.com/s/217893
Acn you tell me where I am making a mistake?