void InsertAt ( int nIndex, CObject * newElement, int nCount = 1 );
´øÁ® ( CMemoryException );
void InsertAt ( int nStartIndex, CObArray * pNewArray );
´øÁ® ( CMemoryException );
¸Å°³ º¯¼ö
nIndex
GetUpperBound ¿¡ ÀÇÇØ ¹Ýȯ µÇ´Â °ª º¸´Ù Ŭ ¼ö ÀÖ½À´Ï´Ù ÇÏ´Â Á¤¼ö À妽º¡£
newElement
ÀÌ ¹è¿¿¡ ¹èÄ¡ µÉ CObject Æ÷ÀÎÅÍÀÔ´Ï´Ù. NewElement NULL °ªÀÇ Çã¿ë¡£
nCount
ÀÌ ¿ä¼Ò°¡ µÇ¾î¾ß Çϴ Ƚ¼ö (±âº»°ª: [1])¸¦ »ðÀÔ¡£
nStartIndex
GetUpperBound ¿¡ ÀÇÇØ ¹Ýȯ µÇ´Â °ª º¸´Ù Ŭ ¼ö ÀÖ½À´Ï´Ù ÇÏ´Â Á¤¼ö À妽º¡£
pNewArray
ÀÌ ¹è¿¿¡ Ãß°¡ µÇ´Â ¿ä¼Ò¸¦ Æ÷ÇÔ ÇÏ´Â ¶Ç ´Ù¸¥ ¹è¿¡£
ÁÖÀÇ
InsertAt ÀÇ Ã¹ ¹ø° ¹öÀü ¹è¿¿¡¼ ÁöÁ¤ µÈ À妽º¿¡¼ ¿ä¼Ò (¶Ç´Â ¿ä¼Ò º¹»çº»À» ¿©·¯ °³)À» »ðÀÔÇÕ´Ï´Ù. °úÁ¤¿¡¼ ±×°Í ±³´ë (À妽º Áõ°¡) ÇÏ ¿©ÀÌ À妽º¿¡ ±âÁ¸ ¿ä¼Ò À§ÀÇ ¸ðµç ¿ä¼Ò¸¦ À̵¿¡£
NStartIndex À§Ä¡¿¡¼ ½ÃÀÛ ÇÏ´Â ´Ù¸¥ CObArray Ä÷º¼Ç¿¡¼ ¸ðµç ¿ä¼Ò¸¦ »ðÀÔ ÇÏ´Â µÎ ¹ø° ¹öÀü¡£
SetAt ÇÔ¼ö´Â ´ëÁ¶ÀûÀ¸·Î, ÇϳªÀÇ ¹è¿ ¿ä¼Ò¸¦ ´ëü ÇÏ °í ¸ðµç ¿ä¼Ò¸¦ À̵¿ ÇÏÁö ¾Ê½À´Ï´Ù.
´ÙÀ½ Ç¥¿¡¼ CObArray::InsertAt ¿Í À¯»çÇÑ ´Ù¸¥ ¸â¹ö ÇÔ¼ö¡£
Ŭ·¡½º | ¸â¹ö ÇÔ¼ö |
CByteArray | InsertAt ¹«È¿ (int nIndex¹ÙÀÌÆ® newElement, int nCount=1); nbsp;´øÁ® ( CMemoryException );(&N)
InsertAt ¹«È¿ (int nStartIndex, CByteArray * pNewArray ); |
CDWordArray | InsertAt ¹«È¿ (int nIndex, DWORD newElement, int nCount=1); nbsp;´øÁ® ( CMemoryException );(&N)
InsertAt ¹«È¿ (int nStartIndex, CDWordArray * pNewArray ); |
CPtrArray | InsertAt ¹«È¿ (int nIndex, void * newElement, int nCount=1); nbsp;´øÁ® ( CMemoryException );(&N)
InsertAt ¹«È¿ (int nStartIndex, CPtrArray * pNewArray ); |
CStringArray | InsertAt ¹«È¿ (int nIndex, LPCTSTR newElement, int nCount=1); nbsp;´øÁ® ( CMemoryException );(&N)
InsertAt ¹«È¿ (int nStartIndex, CStringArray * pNewArray ); |
CUIntArray | InsertAt ¹«È¿ (int nIndex, UINT newElement, int nCount=1); nbsp;´øÁ® ( CMemoryException );(&N)
InsertAt ¹«È¿ (int nStartIndex, CUIntArray * pNewArray ); |
CWordArray | InsertAt ¹«È¿ (int nIndex, ´Ü¾î newElement, int nCount=1); nbsp;´øÁ® ( CMemoryException );(&N)
InsertAt ¹«È¿ (int nStartIndex, CWordArray * pNewArray ); |
¿¹Á¦
CObList::CObList ÀÇ ¸ñ·Ï¿¡ ´ë ÇÑ ÂüÁ¶´Â CAge
Ä÷º¼ÇÀÇ ¸ðµç ¿¹Á¦¿¡ »ç¿ë µÇ´Â Ŭ·¡½º¡£
/ / Cobarray::insertat¿¡ ´ë ÇÑ ¿¹Á¦
nbsp;? CObArray ¹è¿;
??
?? ¹è¿ÀÔ´Ï´Ù.Ãß°¡ (»õ·Î¿î ÄÉÀÌÁö (21)); / / ¿ä¼Ò 0
?? ¹è¿ÀÔ´Ï´Ù.Ãß°¡ (»õ·Î¿î ÄÉÀÌÁö (40)); / / ¿ä¼Ò 1 (2 µÉ °Í ÀÌ´Ù).
?? ¹è¿ÀÔ´Ï´Ù.InsertAt (1, »õ·Î¿î ÄÉÀÌÁö (30));? / / »õ ¿ä¼Ò 1
# ifdef _DEBUG
?? afxDump.SetDepth (1);
?? afxDump << "InsertAt ¿¹:" << & ¹è¿ << "\n";
# endif
ÀÌ ÇÁ·Î±×·¥¿¡¼ °á°ú°¡ ´ÙÀ½°ú °°½À´Ï´Ù.:
InsertAt ¿¹: 3 ¿ä¼Ò¿Í CObArray
nbsp;? [0] = ÄÉÀÌÁö 45 C $8 21
?? [1] = $4646¿¡¼ ÄÉÀÌÁö 30
?? [2] = $4606¿¡¼ ÄÉÀÌÁö 40(&N)
CObArray °³¿ä |nbsp; Ŭ·¡½º ¸â¹ö (ko) | °èÃþ ±¸Á¶ Â÷Æ®(&N)
Âü°í Ç׸ñnbsp;CObArray::SetAt, CObArray::RemoveAt(&N)