本文整理汇总了C++中Hash::out方法的典型用法代码示例。如果您正苦于以下问题:C++ Hash::out方法的具体用法?C++ Hash::out怎么用?C++ Hash::out使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Hash
的用法示例。
在下文中一共展示了Hash::out方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(){
Time* time;
Hash* hash;
Heap* heap;
Song* playing;
std::string line;
std::string filename;
while (getline(std::cin, line)){
if (line.substr(0, 3) == "RUN"){
filename = line.substr(4, line.length()-4);
if (DEBUG){
std::cout << "\nINPUT: '" << line << "'" << std::endl;
std::cout << "TIME: " << "NULL" << std::endl;
std::cout << "-----SONGS-----" << std::endl;
std::cout << "--HASH--" << std::endl;
std::cout << "NULL" << std::endl;
std::cout << "--HEAP--" << std::endl;
std::cout << "NULL" << std::endl;
std::cout << "--CLOSE SONGS--\n" << std::endl;
}
if (run(filename, time, hash, heap, playing)) break;
}else{
if (parseLine(line, time, hash, heap, playing)) break;
if (DEBUG){
std::cout << "\nINPUT: '" << line << "'" << std::endl;
std::cout << "TIME: " << time->prettyCurrentTime() << std::endl;
std::cout << "-----SONGS-----" << std::endl;
std::cout << "--HASH--" << std::endl;
hash->out();
std::cout << "--HEAP--" << std::endl;
heap->out(time->getElapsedTime());
std::cout << "--CLOSE SONGS--\n" << std::endl;
}
}
}
delete hash;
delete heap;
delete time;
return 0;
}