본문내용
#include
#include
#include
using namespace std;
class Node
{
friend class NodeList; //링크드 리스트를 위해서 프렌드 이용
friend class SellNode;
private:
string date;
string brand;
string model;
int value;
Node *next;
int count;
public:
Node(string _date,string _brand,string _model,int _value,Node *_next = NULL);
~Node() {}
};
Node::Node(string _date,string _brand,string _model,int _value,Node *_next)
{
date = _date;
brand = _brand;
model = _model;
value = _value;
next = _next;
count = 1;
}
class NodeList
{
friend class SellNode;
private:
Node *head;
public:
NodeList(Node *_head = NULL);
~NodeList();
void sortInsert(string _date, string _brand, string _model, int _value, Node *_next);
void printf();
void search(string _model,SellNode *);
};
NodeList::NodeList(Node *_head)
{
head = _head;
}
NodeList::~NodeList()
{
Node *temp = head;
while(temp != NULL)
{
Node *delNode;
delNode = temp;
temp = temp-> next;
delete delNode;
}
}
class SellNode : public NodeList //팔때이용할 함수
{
private:
public:
void sellPrint();
void sellInsert(string _date, string _brand, string _model, int _value, Node *_next);
SellNode(Node *_head = NULL);
~SellNode();
};
SellNode::SellNode(Node *_head)
#include
#include
using namespace std;
class Node
{
friend class NodeList; //링크드 리스트를 위해서 프렌드 이용
friend class SellNode;
private:
string date;
string brand;
string model;
int value;
Node *next;
int count;
public:
Node(string _date,string _brand,string _model,int _value,Node *_next = NULL);
~Node() {}
};
Node::Node(string _date,string _brand,string _model,int _value,Node *_next)
{
date = _date;
brand = _brand;
model = _model;
value = _value;
next = _next;
count = 1;
}
class NodeList
{
friend class SellNode;
private:
Node *head;
public:
NodeList(Node *_head = NULL);
~NodeList();
void sortInsert(string _date, string _brand, string _model, int _value, Node *_next);
void printf();
void search(string _model,SellNode *);
};
NodeList::NodeList(Node *_head)
{
head = _head;
}
NodeList::~NodeList()
{
Node *temp = head;
while(temp != NULL)
{
Node *delNode;
delNode = temp;
temp = temp-> next;
delete delNode;
}
}
class SellNode : public NodeList //팔때이용할 함수
{
private:
public:
void sellPrint();
void sellInsert(string _date, string _brand, string _model, int _value, Node *_next);
SellNode(Node *_head = NULL);
~SellNode();
};
SellNode::SellNode(Node *_head)
추천자료
Understanding the Linux Kernel (제 12장 – 가상 파일시스템)
MFC를 이용한 명함관리프로그램
자료구조를 이용한 주차장 시뮬레이션
스택을 이용한 후위식 변환 및 수식 계산
[유닉스] 쉘 Shell 셸 프로그래밍 전체 소스코드 및 상세주석
c++ 비디오샵프로그램.
[C언어] 구조체를 이용한 세븐포커 프로그램 소스
최단거리 최소환승 알고리즘 구현(지하철노선도)
[자료구조1] Union-Find Algorithm (DisjointSet) - 14주차
주소록 (API)
C++가계부
독학자료구조
은행계좌 관리 프로그램
학생 관리 프로그램(성적관리 포함) CPP
소개글