Printf不打印任何输出内容吗? C ++ SDL [英] Printf is not printing anything to output? C++ SDL
本文介绍了Printf不打印任何输出内容吗? C ++ SDL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图在我的Visual C ++项目中使用 printf,但是它不起作用。使用Lazy Foo的教程,我在项目中设置了SDL,但是在播放它时,printf并没有执行任何操作。
I am trying to use "printf" in my Visual C++ project however it is not working. Using Lazy Foo's tutorial, I set up SDL in my project, but when I play it, printf doesnt do anything.
#include "SDL.h"
#include <stdio.h>
int main( int argc, char* args[] ) {
printf("Testing");
return 0;
}
输出看起来像这样:
The program '[4664] SDL Testing.exe: Native' has exited with code 0 (0x0).
就是这样。
推荐答案
默认情况下,SDL将stdout重定向到文件 stdout.txt
。您应该在程序的工作目录中找到它。
SDL by default redirects stdout to a file, stdout.txt
. You should find it in your program's working directory.
这篇关于Printf不打印任何输出内容吗? C ++ SDL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文