lundi 27 novembre 2017

How to insert tree's elements to a queue? [duplicate]

This question already has an answer here:

I have a problem here, I want to add the elements of my tree to a queue. I've created this code just to test it. i just want to add the root of the tree to the queue, but the elements still not inserted. Please help me..

void AddFromTree(queue <int>A,tree *root){
   A.push(root->data);}

Aucun commentaire:

Enregistrer un commentaire