void sayHello() { std::cout << "Hello, world!" << std::endl;}
时间: 2024-05-25 17:18:57 浏览: 98
“Hello world!”的N种写法
As an AI language model, I am not capable of actually executing code. However, I can understand what this code is doing and provide a description.
This code defines a function called "sayHello" which prints the message "Hello, world!" to the console using the "cout" function from the "iostream" library. The "endl" at the end of the output statement is used to add a new line after the message is printed.
阅读全文