list::pop_front (STL/CLR)
첫 번째 요소를 제거합니다.
void pop_front();
설명
멤버 함수는 비어 있어야 제어 된 시퀀스의 첫 번째 요소를 제거 합니다.이 목록의 한 요소 앞에 줄일 수 있습니다.
예제
// cliext_list_pop_front.cpp
// compile with: /clr
#include <cliext/list>
int main()
{
cliext::list<wchar_t> c1;
c1.push_back(L'a');
c1.push_back(L'b');
c1.push_back(L'c');
// display contents " a b c"
for each (wchar_t elem in c1)
System::Console::Write(" {0}", elem);
System::Console::WriteLine();
// pop an element and redisplay
c1.pop_front();
for each (wchar_t elem in c1)
System::Console::Write(" {0}", elem);
System::Console::WriteLine();
return (0);
}
요구 사항
헤더: < cliext/목록 >
네임 스페이스: cliext