Reading the hands from the file shouldn't be difficult, but there's way more to identifying hands than even your assignment implies, and your professor's own example function is wrong. Poker hands don't care about the order of cards, so his function to recognize a royal flush (with an R :-) will fail 119 out of 120 times. You could partly fix this by sorting the hands first, but then you need special case code for wheels (A2345 straight). Also, identifying the "type" of hand is only the first step in determining which of two hands wins. Finally, all this applies only to standard 5-card poker hands, and doesn't apply to Texas Hold'em, where you'll need to do best 5 of 7 cards. Google "poker hand evaluator" and you'll find more information than you could possibly imagine. A good place to start for C++ is Pokerstove on Github (or my own onejoker).
I suspect your professor doesn't really understand what's involved, and would be quite happy to see half-assed solutions like his own just to see that you could produce code that does something resembling the actual job.