I have gets command in my code but when it should prompt me it skips right past it and it appears to insert a number string that looks to be related to the number of character designated in the char declaration. Her is a copy of the function. Is thare any other command that can be used to prompt for a keyboard input as a continious string including spaces?
int retrieve (AVL_TREE *tree)
{
/* Local Declarations */
char crap[27];
void *addr;
/* Statements */
puts("Please enter a Name: "
;
gets( crap );
addr = AVL_Retrieve (tree, crap);
printf("%d",crap);
if (addr)
printf("\nKey found. Contains %d\n", addr);
else
printf("\n\aKey %d not found\n", crap);
return(0);
} /* retrieve */
int retrieve (AVL_TREE *tree)
{
/* Local Declarations */
char crap[27];
void *addr;
/* Statements */
puts("Please enter a Name: "
gets( crap );
addr = AVL_Retrieve (tree, crap);
printf("%d",crap);
if (addr)
printf("\nKey found. Contains %d\n", addr);
else
printf("\n\aKey %d not found\n", crap);
return(0);
} /* retrieve */