简体   繁体   中英

How can I print to the console in c++?

How can I print to the console in c++? I'm not sure how, and print("") doesn't work like in python. help please. I am not sure what to try now.

If you include a library called iostream with #include at the beginning of your code.

This will allow you use something like cout << "Text Here"; Hope this helped!

Include <iosstream> and print using cout << "Text Here";

Example:

#include <iostream>

... 


cout << "Text Here"; 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM