Use a while loop, rfind the space, cout the word and in the next round rfind beginning at the position before the last space. If you cant even use the while loop skip the lessons until you can...:-D
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation." -- Caius Petronius, Roman Consul, 66 A.D.