hi gang,keeping getting this error,unterminated character constant, where the * is, and i dont know what i can do..
basically i want the code to output "suffixtree: " and take in input if that makes sense.
I hope someone can help me as i think its just a simple error.
happy new year
basically i want the code to output "suffixtree: " and take in input if that makes sense.
I hope someone can help me as i think its just a simple error.
happy new year
Code:
// Loop over the user's input until told to quit
error // while ( input = * >> ( "suffixtree> ") ) {
add_history( input );
command = strtok( input, " " );
argument = strtok( NULL, " " );
if (strcmp(command,"print") == 0)
ST_PrintTree(tree);
else if (strcmp(command,"find") == 0 ) {
unsigned long int i;
//(void)scanf("%s",substring);
i = ST_FindSubstring( tree,
(unsigned char*)argument,
(DBL_WORD)strlen(argument) );
printf("%lu \n",i);
}
else if (strcmp(command,"findall") == 0 ) {
//(void)scanf("%s",substring);
(void)ST_FindAllSubstring( tree,
(unsigned char*)argument,
(DBL_WORD)strlen(argument));
}
else if (strcmp(command,"test") == 0 )
(void)ST_SelfTest(tree);
else if (strcmp(command,"?") == 0 || strcmp(command,"help") == 0 ) {
PrintHelp();
}
else if (strcmp(command,"quit") == 0 ) {
break;
}
else {
printf("Unrecognized command %s - enter 'help' for help\n",command);
}
}