scanf("%[^\n]%*c",str);

NoSuchKey

рекомендация

отblog.csdn.net/qq_45803449/article/details/127409062