#include"Listing.h"
//Adds the Advertisement pointer given by the parameter to the vector objects
void Listing::add(Advertisement* ptr)
{
this->objects.push_back(ptr);
}
//This returns an iterator to the first Advertisement* in vector objects
Listing::iterator Listing::begin()
{
return this->objects.begin();
}
//This returns an iterator to the last Advertisement* in vector objects
Listing::iterator Listing::end()
{
return this->objects.end();
}
//This returns the Advertisement pointer whose number equals the parameter number
Advertisement* Listing::operator[](const int& number)
{
for(int i = 0; i <= objects.size(); i++)
{
if(number == objects[i]->getNumber())
{
return objects[i];
}
}
return NULL;
}
数据结构ssd5 exercise2
2星 需积分: 12 45 浏览量
2009-04-26
16:33:26
上传
评论
收藏 796B RAR 举报
wz685
- 粉丝: 0
- 资源: 9
最新资源
- 基于protel99se(原理图库+封装库)电路设计硬件PCB设计protel库合集protel封装大全(近3000个).zip
- python-leetcode面试题解之第157题用Read4读取N个字符-题解.zip
- python-leetcode面试题解之第156题上下翻转二叉树-题解.zip
- python-leetcode面试题解之第155题最小栈-题解.zip
- python-leetcode面试题解之第153题寻找旋转排序数组中的最小值-题解.zip
- python-leetcode面试题解之第152题乘积最大子数组-题解.zip
- python-leetcode面试题解之第151题反转字符串中的单词-题解.zip
- python-leetcode面试题解之第150题逆波兰表达式求值-题解.zip
- python-leetcode面试题解之第149题直线上最多的点数-题解.zip
- python-leetcode面试题解之第148题排序链表-题解.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈