我遇到此代码
scanf("0.%[0-9]...\n", &x);
为什么我们使用0。%之前?
您在scanf中放入的常规字符(不是转换的一部分,应在提供输入时按顺序输入,例如:
scanf("<-%c", c); // Need to suply <- and then a character.
否则将无法接受输入。