📄 main.cpp
字号:
#include "DynamicPhraseTable.h"
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
DynamicPhraseTable wordtable;
string str;
vector<ID> v;
/*
wordtable.InsertPhrase("angqi", 0, 12) ;
wordtable.InsertPhrase("haha", 1, 33) ;
while(cin >> str )
{
int longestMatch=0 ;
if( (longestMatch = wordtable.GetPhraseByLongestMatchPy(str, v)) > 0 )
{
cout << "match: " << str.substr(0, longestMatch) << endl;
}
else
{
//Add the str to the static hash_map and the Vector hash table;
cout << "There is no word in the Vector map" << endl;
}
}*/
v.push_back(ID(1, 13)) ;
v.push_back(ID(2, 20)) ;
v.push_back(ID(3, 11)) ;
sort(v.begin(), v.end()) ;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -