当前位置: 首页>>代码示例>>C++>>正文


C++ People类代码示例

本文整理汇总了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;
}
开发者ID:Ballneng,项目名称:CPPLessons,代码行数:7,代码来源:main.cpp

示例2: main

int main() {
    People *p = PeopleInit(ObjectCreate(People),20);
    p->sayHello();
    ObjectDelete(p);

    return 0;
}
开发者ID:xiang12835,项目名称:CLearn,代码行数:7,代码来源:main.c

示例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();
}
开发者ID:Nowar,项目名称:OnlineJudge,代码行数:7,代码来源:UVa.cpp

示例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;
}
开发者ID:TomFrost,项目名称:scummvm,代码行数:29,代码来源:stubs.cpp

示例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;
	}

}
开发者ID:GMIS,项目名称:GMIS,代码行数:26,代码来源:Space.cpp

示例6: main

int main(int argc, const char * argv[]) {
    
    People *p = new People();
    p->hello();
    delete p;
    return 0;
}
开发者ID:blue99x,项目名称:CppLession,代码行数:7,代码来源:main.cpp

示例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;
}
开发者ID:stephenxe,项目名称:CPPLessons,代码行数:8,代码来源:main.cpp

示例8: main

int main() {
//	cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!

	People * p = new People();
	p->sayHi();

	return 0;
}
开发者ID:plter,项目名称:AndroidLessons20130708,代码行数:8,代码来源:L13_HelloCPP.cpp

示例9: main

int main()
{
	People p;

	Camera c1;
	p.UseCamera(&c1);

	Camera2 c2;
	p.UseCamera(&c2);
}
开发者ID:JaeminShim,项目名称:NCUDesignPatternCPP,代码行数:10,代码来源:3_abstract_class3.cpp

示例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;
}
开发者ID:KDE,项目名称:macaw-movies,代码行数:13,代码来源:People.cpp

示例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;
    }
}
开发者ID:Chester94,项目名称:DataBase_People,代码行数:28,代码来源:mainwindow.cpp

示例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;
}
开发者ID:whatc,项目名称:xcode,代码行数:14,代码来源:main.cpp

示例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;
}
开发者ID:whatc,项目名称:xcode,代码行数:15,代码来源:main.cpp

示例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;
}
开发者ID:yuliang136,项目名称:CPPLessions,代码行数:15,代码来源:main.cpp

示例15: Logon

bool  ROOM_SPACE::Logon(int64 SourceID,People& Who){
	if(AllowInto(Who)){
		Who.GoInto(SourceID,*this);
		return true;
	}
	else return false;
}
开发者ID:GMIS,项目名称:GMIS,代码行数:7,代码来源:Space.cpp


注:本文中的People类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。