在newboston的第10部分中进行了介绍,创建了使用参数[closed]的函数

问题描述 投票:-1回答:1

我开始使用来自newboston的教程开始学习c ++,但坚持第10部分,无法弄清楚我做错了什么,我正在使用同一程序(CODE :: BLOCKS)来遵循该教程,如果我犯了任何错误,请再次检查我找不到。请告诉我我是否犯了错误

#include <iostream>
namespace std;

void printCrap(int x){
cout <<"buckys favourite number is " << x << endl;
}


int main
{
printCrap(24);
return 0;
};
c++ function
1个回答
0
投票

您应按以下方式编写代码:

© www.soinside.com 2019 - 2024. All rights reserved.