Shooting using Line Trace in C++

Take a look at this question