listing.h

来自「1.注册功能 2.登录功能 3.退出系统功能 4.发布新广告功能 5.添」· C头文件 代码 · 共 44 行

H
44
字号
#ifndef LISTING_H
#define LISTING_H

#include <iostream>
#include <vector>
#include <iterator>
#include <algorithm>
#include <functional>

#include "Advertisement.h"

using namespace std;

class Listing;

class Listing {

protected:
	typedef vector<Advertisement*> Container;

public:
	typedef Container::iterator iterator;

protected:
	Container objects;

public:
	virtual Advertisement* operator[](const int& number);

	virtual void add(Advertisement* ptr);

	virtual iterator begin();
	virtual iterator end();

	// return a sorted copy of this Listing
	virtual Listing sort(string field);

	// return a filtered by keyword copy of this Listing
	virtual Listing filter(string keyword);
    /*virtual void remove(Listing list);*/
};

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?