按照书上的视频教程写下来,运行时出现错误 warning: the gets function is dangerous and should not be used.
原因暂时还不知道。解决方法就是将gets改成fgets
char* fgets(char *string, int length, FILE * stream);
具体的解释可以参考http://stackoverflow.com/questions/1694036/why-is-the-gets-function-so-dangerous-that-it-should-not-be-used
看完前三个评论就能明白了