'How can I create queue that can use in Breadth-first-search?

This is an example of my code, I create node from the tree

typedef struct _treenode
{
  int data;
  struct _treenode* left;
  struct _treenode* right; 
}TREENODE_T;


int main(void) {
  //create node
  TREENODE_T* N1 = newNodeCreate(9);
  TREENODE_T* N2 = newNodeCreate(6);
  TREENODE_T* N3 = newNodeCreate(10);

  //set child node
  int status;
  status = setChildNote(N1, N2, 'L');
  status = setChildNote(N1, N3, 'R');

  QUEUE_T* queue=queueCreate(10);
  breadthSearch(root,queue);

But I don't know how to create a queue that can stack TREENODE_T*. What should I do?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source