[英]How can I print to the console in c++?
How can I print to the console in c++?如何在 c++ 打印到控制台? I'm not sure how, and print("")
doesn't work like in python. help please.我不确定如何,并且print("")
不像 python 那样工作。请帮忙。 I am not sure what to try now.我不确定现在该尝试什么。
If you include a library called iostream with #include at the beginning of your code.如果您在代码的开头包含一个名为 iostream 的库,并带有 #include。
This will allow you use something like cout << "Text Here";
这将允许您使用类似cout << "Text Here";
Hope this helped!希望这有帮助!
Include <iosstream>
and print using cout << "Text Here";
包含<iosstream>
并使用cout << "Text Here";
Example:例子:
#include <iostream>
...
cout << "Text Here";
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.