main.cpp

来自「我们一个小组」· C++ 代码 · 共 36 行

CPP
36
字号
#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 + =
减小字号Ctrl + -
显示快捷键?