📄 group.cpp
字号:
#include"Group.h"
//Adds the Client pointer given by the parameter to the vector objects
void Group::add(Client* ptr)
{
this->objects.push_back(ptr);
}
//This returns an iterator to the first Client* in vector objects
Group::iterator Group::begin()
{
return this->objects.begin();
}
//This returns an iterator to the last Client* in vector objects
Group::iterator Group::end()
{
return this->objects.end();
}
//This returns the Client pointer whose object's email equals the parameter email
Client *Group::operator[](const string& email)
{
for(int i=0;i<objects.capacity();++i)
{
if(objects.at(i)->getEmail() == email)
{
return objects.at(i);
}
}
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -