We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sorry,i'm a newbie,Who can tell me the problem of following code? //code
int main(int args,char *argv[]) { hash_t *hash_tab = NULL; char k[32] = {0}; char cont[8] = {0}; int value = 0; hash_tab = hash_new(); do { printf("input key\n"); scanf("%s",k); printf("input value\n"); scanf("%d",&value); if(!hash_has(hash_tab,k)) hash_set(hash_tab,k,&value); printf("conitinue add key? [y|n]\n"); scanf("%s",cont); }while(!strcasecmp("y",cont)); hash_each(hash_tab, { printf("%s: %d\n", key, *(int *) val); }); hash_free(hash_tab); }
//exe: ./test input key li input value 2 conitinue add key? [y|n] y input key yan input value 3 conitinue add key? [y|n] n yan: 3 yan: 3
The text was updated successfully, but these errors were encountered:
No branches or pull requests
sorry,i'm a newbie,Who can tell me the problem of following code?
//code
//exe:
./test
input key
li
input value
2
conitinue add key? [y|n]
y
input key
yan
input value
3
conitinue add key? [y|n]
n
yan: 3
yan: 3
The text was updated successfully, but these errors were encountered: