Both human and nonhuman primates use imperative pointing to request a desired object from another individual. Gaze alternation often accompanies such pointing gestures, and in species that have no hands this can in itself function as imperative pointing. Dogs have exceptional skills in communicating with humans. The early development of these skills is suggested to have been facilitated by domestication. Adult wolves socialized with humans can use human-provided information to find food in various situations, but it is unclear whether they would use gaze alternation to show their human partner a target location they cannot reach on their own. In our experiment, we tested wolves and dogs in a task where they could indicate an out-of-reach food location to one of two human partners. One partner reacted in a cooperative way and gave the food hidden in the indicated location to the subject whereas the other responded in a competitive way and ate the food herself. Our results suggest that wolves, as well as dogs, use 'showing' behaviours to indicate a food location to a human partner, and that both can adjust their communication to the cooperativeness of their human partners, showing more indicating signals in the presence of the cooperative partner than in the presence of the competitive one. We conclude that wolves and dogs, both kept in packs under the same conditions, can use humans as cooperative partners, and point imperatively in order to receive a desired out-of-reach object. It seems that intensive socialization with humans enables both wolves and dogs to communicate cooperatively about a food location with humans, most probably relying on skills that evolved to promote social coordination within their packs.