I was given the task to use a stack to convert numbers from base 10 to base 2 using C++. I was given the numbers 18, 27, 71, 107 and 178. I have no idea where to start and I was just wondering if someone would be willing to help me by writing a sample code and explaining it to me. 

My teacher isn't exactly the best.