How do I make and use a Queue in Objective-C?

后端 未结 10 1249
栀梦
栀梦 2020-11-27 10:21

I want to use a queue data structure in my Objective-C program. In C++ I\'d use the STL queue. What is the equivalent data structure in Objective-C? How do I push/pop ite

10条回答
  •  爱一瞬间的悲伤
    2020-11-27 10:42

    There's no real queue collections class, but NSMutableArray can be used for effectively the same thing. You can define a category to add pop/push methods as a convenience if you want.

提交回复
热议问题