E D R , A S I H C RSS

Collection Parameter

Collecting Parameter

몇몇 메 ?(?)

ComposedMethod 는, . , . ComposedMethod 만, . 를 멤 . , . .

, 메들마 . 는 방 , 들보.

녀를 내는 를 보.
~cpp 
vector<People> marriedMenAndUnmarriedWomen()
{
	vector<People> result;
	for(vector<People>::iterator it = result.begin() ; it != result.end() ; ++it)
	{
		if(it->isMarried() and it->isMan())
			result.add(*it);
	}
	for(vector<People>::iterator it = result.begin() ; it != result.end() ; ++it)
	{
		if(it->isUnmarried() and it->isWoman())
			result.add(*it);
	}
	return result;
}
ComposedMethod.
~cpp 
vector<People> marriedMen()
{
	vector<People> result;
	for(vector<People>::iterator it = result.begin() ; it != result.end() ; ++it)
	{
		if(it->isMarried() and it->isMan())
			result.add(*it);
	}
	return result;
}
vector<People> unmarriedMen()
{
	vector<People> result;
	for(vector<People>::iterator it = result.begin() ; it != result.end() ; ++it)
	{
		if(it->isUnmarried() and it->isWoman())
			result.add(*it);
	}
	return result;
}
vector<People> marriedMenAndUnmarriedWomen()
{
	return marriedMen() + unmarriedMen();	//  는 모르 .
}

.
~cpp 
vector<People> marriedMenAndUnmarriedWomen()
{
	vector<People> result;
	addMarriedMenTo(result);
	addUnmarriedWomenTo(result);
	return result;
}

void addMarriedMen(vector<People>& aCollection)
{
	for(vector<People>::iterator it = result.begin() ; it != result.end() ; ++it)
	{
		if(it->isMarried() and it->isMan())
			aCollection.add(*it);
	}
}
void addUnmarriedMen(vector<People>& aCollection)
{
	for(vector<People>::iterator it = result.begin() ; it != result.end() ; ++it)
	{
		if(it->isUnmarried() and it->isWoman())
			aCollection.add(*it);
	}
}

, 를 모데, . CollectionParameter read/write 등 I/O 내부 는 Serialization 등 . I/O 부 Stream 만들(C++ Stream Stream 만들 ) parameter . --1002


Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:22:57
Processing time 0.0101 sec