Seek
Seek user dictionary record
Seek to the first record
int mseekhead();
Seek to the next record
int mseeknext();
Seek to the next 10 records
If there are less than 10 records until the end, seek to the end
int mseeknext10();
Seek to the record specified by code
int mseek(char* code);
Seek to the previous record
int mseekprev();
Seek to the previous 10 records
If there are less than 10 records until the beginning, seek to the beginning
int mseekprev10();
Seek to the end
int mseektail();
Input
char* code; String
Return Value
1.....Found
0.....Not found
Negative....FILE_SEEK_ERROR...File seek error
Example
#include "ocrdef.h"
#include "ocrco.h"
#include "cjocrstock.h"
#include "cjocrdict98.h"
#include "errcode.h"
...
....
CJocrDict* pjocrdict = new CJocrDict;
pjocrdict->msetsystemdict("c:\\dic\\feature\\system");
pjocrdict->msetsystemdict("c:\\dic\\feature\\systemfat");
int ret = pjocrdict->mloaddict();
if(ret < 0) {
printf("Error");
}
ret = pjocrdict->mseek("漢");
if(ret < 0) {
printf("Error");
}
else if(ret == 0) {
printf("No pattern corresponding to 漢 is registered");
}
else {
printf("Pattern corresponding to 漢 is found");
}
delete pjocrdict;