How would i use line trace in c++

i’m having trouble with the hit.getactor it’s telling me that hit is undefined