does anyone know how to break out of a function that has a void function? for example,
void insertBST(KeyType k, int lineNum, BST t)
{ PtrToBSTNode p=t->root;
while(p!=NULL)
{ if(strcmp(k, p->key == 0)
InsertLineList(lineNum, p->l); /* <-how can you stop*/
else p=p->right; /* the function here? */
...
}
p->key =malloc(strlen(k));
strcpy(p->key, k);
}
any help would be greatly appreciated. thank you!
-christine
Comments
: does anyone know how to break out of a function that has a void function? for example,
:
: void insertBST(KeyType k, int lineNum, BST t)
: { PtrToBSTNode p=t->root;
: while(p!=NULL)
: { if(strcmp(k, p->key == 0)
: InsertLineList(lineNum, p->l); /* <-how can you stop*/
: else p=p->right; /* the function here? */
: ...
: }
: p->key =malloc(strlen(k));
: strcpy(p->key, k);
: }
:
: any help would be greatly appreciated. thank you!
: -christine
:
you have to use exit(), its included in conio.h i think
: you have to use exit(), its included in conio.h i think
:
Hello,
exit() will quit the program...And I belive that not what we what here.
Return will only quit the current function.
Pat