本文整理汇总了C++中Number::getNumberString方法的典型用法代码示例。如果您正苦于以下问题:C++ Number::getNumberString方法的具体用法?C++ Number::getNumberString怎么用?C++ Number::getNumberString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Number
的用法示例。
在下文中一共展示了Number::getNumberString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: cli
int cli(FILE* mainio)
{
char buf[1024];
List<Word> *inputData;
List<Data> memory;
Tree *my;
int i = 0;
while (strcmp(buf,"q\n")){
my = new Tree;
fprintf(stdout,"#");
fgets(buf,1023,mainio);
if (!strcmp(buf,"q\n"))
continue;
if (!strncmp(buf,"h\n",2)){
printHelp(stdout);
continue;
}
if (!strncmp(buf,"mem",3) || buf[4] == '\n' || buf[4] == ' '){
memOut(stdout,memory);
continue;
}
if (!strncmp(buf,"undef",5)){
if (buf[5]==' '){
undefine(buf+5,memory);
continue;
}
}
if (!strncmp(buf,"undefine",8)){
if (buf[8]==' '){
undefine(buf+8,memory);
continue;
}
}
if (!strncmp(buf,"delete",6)){
if (buf[6]==' '){
undefine(buf+6,memory);
continue;
}
}
if (!strncmp(buf,"del",3)){
if (buf[3]==' '){
undefine(buf+3,memory);
continue;
}
}
if (buf[0]=='\n'){
fprintf(stdout,"Empty. Type \"h\" for help.\n");
continue;
}
//TODO: Implement all CLI commands
inputData = stringParse(buf);
improveInput(*inputData);
my->AltBuild(inputData->tail);
Node *p = my->root;
std::cout << my->getTreeCharArr() << std::endl;
Number rez;
rez=my->EvaluteTree(memory);
char out[100]("") ;
strcpy(out, rez.getNumberString());
std::cout << out<<std::endl;
delete inputData;
}
return 0;
}