It's not recommended as dog food is different than cat food. But your cat will be fine eating dog food for a few days. That is if he'll eat the dog food.
Some cats won't touch dog food and would rather starve.
You might give your cat some table scraps instead if your cat won't eat dog food.