我的输入如下所示:
save 001 Some very long string with spaces... after three dots there , is also a comma
在此之后我调用类型:
load 001
它应该给我输出:
Some very long string with spaces... after three dots there , is also a comma
我正在尝试,但似乎没有任何效果,例如:
while ((scanf("%s %s", mode, key)) != EOF) {
if (strcmp(mode, "save") == 0) {
getchar();
fgets(data, 100, stdin);
root = save(root, key, data);
root = balance_RBT(root, blc);
}
if (strcmp(mode, "load") == 0) {
load(root, key);
}
}