use c+ function in c++ code example
Example 1: function in c++
#include <iostream>
using namespace std;
void function(){
cout << "I am a function!" << endl;
}
int main()
{
function();
return 0;
}
Example 2: functions in C++
void Hello() {
std::cout << "Hello";
}
int main () {
Hello();
}