【C++学习】函数中的void的含义
使用void,即不能将其值赋给任何变量。
void simon(int n)
{
using namespace std;
cout << "Simon says touch your tone " << n << " times." << endl;
}
如果在main函数中调用simon,如:
void main()
{
using namespace std;
int simple;
simon(3);
simple = sim
原创
2022-02-10 09:49:20 ·
4253 阅读 ·
0 评论