일지
자료구조...40
niamdank
2020. 11. 28. 10:45
연결 리스트 스택 생성자 구현
LinkedListStack.cpp
/// <summary>
/// 비어있고 초기 용량을 가지는 LinkedListStack를 생성한다.
/// </summary>
/// <param name="capacity">생성할 공간의 크기(기본: 10)</param>
LinkedListStack::LinkedListStack()
: m_top(0)
{
}
/// <summary>
/// 다른 LinkedListStack와 동일한 값을 가지는 LinkedListStack를 생성한다.
/// </summary>
/// <param name="other">기준이 될 LinkedListStack</param>
LinkedListStack::LinkedListStack(const LinkedListStack& other)
: m_top(other.m_top), m_items(other.m_items)
{
}