问题:windows,Clion在debug的时候,printf不会实时输出,在程序结束后才会输出。 解决:在程序开始时候禁用缓冲区:setbuf(stdout, 0); 参照: https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000740490-Where-did-the-black-windows-go-?page=1#community_comment_115000619510 https://youtrack.jetbrains.com/issue/CPP-10733