📄 videobinarytreeimp.cpp
字号:
#include <iostream>
#include <string>
#include "videoBinaryTree.h"
using namespace std;
bool videoBinaryTree::isVideoAvailable(string title)
{
cout<<"See Programming Exercise 10."<<endl;
return false;
}
void videoBinaryTree::videoCheckIn(string title)
{
cout<<"See Programming Exercise 10."<<endl;
}
void videoBinaryTree::videoCheckOut(string title)
{
cout<<"See Programming Exercise 10."<<endl;
}
bool videoBinaryTree::videoCheckTitle(string title)
{
cout<<"See Programming Exercise 10."<<endl;
return false;
}
void videoBinaryTree::videoUpdateInStock(string title, int num)
{
cout<<"See Programming Exercise 10."<<endl;
}
void videoBinaryTree::videoSetCopiesInStock(string title,
int num)
{
cout<<"See Programming Exercise 10."<<endl;
}
bool videoBinaryTree::videoSearch(string title)
{
cout<<"See Programming Exercise 10."<<endl;
return false;
}
void videoBinaryTree::searchVideoList(string title,
bool& found,
nodeType<videoType>* ¤t)
{
found = false;
videoType temp;
temp.setVideoInfo(title,"","","","","",0);
if(root == NULL) //the tree is empty
cout<<"Cannot search an empty list. "<<endl;
else
{
current = root; //set current point to the root node
//of the binary tree
found = false; //set found to false
while(!found && current != NULL) //search the tree
if(current->info == temp) //theitem is found
found = true;
else
if(current->info > temp)
current = current->llink;
else
current = current->rlink;
} //end else
}
void videoBinaryTree::videoPrintTitle()
{
inorderTitle(root);
}
void videoBinaryTree::inorderTitle(nodeType<videoType> *p)
{
if(p != NULL)
{
inorderTitle(p->llink);
p->info.printTitle();
inorderTitle(p->rlink);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -