hello queue

#include <iostream>       // std::cout
#include <queue>          // std::queue
#include <stdio.h>

int main ()
{
  std::queue<char*> stringQueue;

  stringQueue.push("aa");
  stringQueue.push("bb");

  std::cout << "size of stringQueue: " << stringQueue.size() << '\n';


 while(!stringQueue.empty()) {
    printf("stringQueue.front()=%s \n", stringQueue.front());
    stringQueue.pop();
  }
  return 0;
}



留言

熱門文章