The a
modifier to scanf won't work if you are compiling with the -std=c99
flag; make sure you aren't using that.
If you have at least version 2.7 of glibc, you can and should use the m
modifier in place of a
.
Also, it is your responsibility to free the buffer.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…