본문 바로가기
C++/열혈 C++

열혈 C++ oop8 Container.h

by Beijing_KingGod 2018. 4. 9.

#ifndef _CONTAINER_H_
#define _CONTAINER_H_
#include "Account.h"

typedef Account* Element;

class Container
{
private:
 Element* arr; // 객체 포인터 배열을 가리키는 포인터
 int length; // 배열의 길이
 int aIndex; // 저장된 객체의 수

public:
 Container(int len=50);
 ~Container();
 void Insert(Element data); // 순차 입력!
 Element Remove(int idx); //idx번째 객체 삭제

 Element GetItem(int idx); //인덱스 idx의 객체 참조
 int GetElemSum(){ return aIndex;} //저장된 객체의
};
#endif

'C++ > 열혈 C++' 카테고리의 다른 글

열혈 C++ oop FaithAccount.h  (0) 2018.04.09
열혈 C++ oop8 ContriAccount.h  (0) 2018.04.09
열혈 C++ oop8 Account.h  (0) 2018.04.09
열혈 C++ opp8 AccManager.h  (0) 2018.04.09
열혈 C++ oop8 main.cpp  (0) 2018.04.09

댓글