本文整理汇总了C++中People类的典型用法代码示例。如果您正苦于以下问题:C++ People类的具体用法?C++ People怎么用?C++ People使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了People类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, const char * argv[]) {
// insert code here...
People *p =new People();
p->sayHello();
delete p;
return 0;
}
示例2: main
int main() {
People *p = PeopleInit(ObjectCreate(People),20);
p->sayHello();
ObjectDelete(p);
return 0;
}
示例3:
bool People::WinThanObj::operator()(const People &A, const People &B) const {
if (A.isRetired())
return false;
if (B.isRetired())
return true;
return A.getVoteCount() > B.getVoteCount();
}
示例4: checkifperson
bool DreamGenContext::checkifperson(uint8 x, uint8 y) {
People *people = (People *)segRef(data.word(kBuffers)).ptr(kPeoplelist, 0);
for (size_t i = 0; i < 12; ++i, ++people) {
if (people->b4 == 255)
continue;
data.word(kReelpointer) = people->reelPointer();
Reel *reel = getreelstart();
if (reel->frame() == 0xffff)
++reel;
const Frame *frame = getreelframeax(reel->frame());
uint8 xmin = reel->x + frame->x;
uint8 ymin = reel->y + frame->y;
uint8 xmax = xmin + frame->width;
uint8 ymax = ymin + frame->height;
if (x < xmin)
continue;
if (y < ymin)
continue;
if (x >= xmax)
continue;
if (y >= ymax)
continue;
data.word(kPersondata) = people->routinePointer();
obname(people->b4, 5);
return true;
}
return false;
}
示例5: DeleteOwner
void ROOM_SPACE::DeleteOwner(People& p)
{
ePipeline& OwnerInfo = GetOwnerInfo();
ePipeline& OwnerList = *(ePipeline*)OwnerInfo.GetData(REG_OWNER_LIST);
for (int i=0; i<OwnerInfo.Size();i++)
{
ePipeline* Owner = (ePipeline*)OwnerList.GetData(i);
tstring& Cryptograph = *(tstring*)Owner->GetData(2);
if (Cryptograph == p.m_Cryptograhp)
{
OwnerList.EraseEnergy(i,1);
return ;
}
}
if(p.GetParentID() == GetSpaceID()){
p.GoOut();
//这里应该有更多处理,p被赶出此空间,那么应该退回到上一个空间
assert(0);
return;
}
}
示例6: main
int main(int argc, const char * argv[]) {
People *p = new People();
p->hello();
delete p;
return 0;
}
示例7: main
int main(int argc, const char * argv[]) {
// insert code here...
People *p =new People( );
p->sayHello();
// std::cout << "Hello, World!\n";
delete p;
return 0;
}
示例8: main
int main() {
// cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
People * p = new People();
p->sayHi();
return 0;
}
示例9: main
int main()
{
People p;
Camera c1;
p.UseCamera(&c1);
Camera2 c2;
p.UseCamera(&c2);
}
示例10:
bool People::operator== (const People &other)
{
if ( this->id() == other.id() &&
this->name() == other.name() &&
this->birthday() == other.birthday() &&
this->biography() == other.biography() &&
this->type() == other.type() )
{
return true;
}
return false;
}
示例11: editRS
void MainWindow::editRS()
{
if( view->currentIndex().isValid() )
{
int row = view->currentIndex().row();
People p;
model->getRec(p, row);
PeopleDialog *dial;
dial = new PeopleDialog;
dial->setPeople(p);
if( dial->exec() == QDialog::Accepted )
{
p.setSurname( dial->getSurname() );
p.setName( dial->getName() );
p.setPatronimic( dial->getPatronomic() );
p.setSex( dial->getSex() );
p.setDate( dial->getDate() );
p.setEducation( dial->getEducation() );
p.setMatrialStatus( dial->getMatrial_Status() );
model->editRec(p, row);
}
delete dial;
}
}
示例12: main
int main(int argc, const char * argv[]) {
// 用命名空间方式来访问类
// jikexueyuan:命名空间
// jikexueyuan::People *p = new jikexueyuan::People();
People *p = new People();
p->sayHello();
//销毁对象
delete p;
return 0;
}
示例13: main
int main(int argc, const char * argv[]) {
//类对象
People *p = new People();
//类方法
p->sayHello();
//销毁对象
delete p;
//C语言的分配内存和销毁内存的关键字
//malloc(sizi_t)
//free(void *)
return 0;
}
示例14: main
int main(int argc, const char * argv[]) {
People *p = new Man(20);
//People *p = new People(20,1);
// Let father point to sun's shili.
// Use the point to call the function with the
// same name in father's
p->sayHello();
p->eat();
return 0;
}
示例15: Logon
bool ROOM_SPACE::Logon(int64 SourceID,People& Who){
if(AllowInto(Who)){
Who.GoInto(SourceID,*this);
return true;
}
else return false;
}