Wednesday, September 25, 2019

Using Functions in C++

I this article I would like to share with you guys how to declare and use functions in C++. Functions are very important in C++ programming it makes our program modularize and we can reuse our code in our other programs. It makes software development faster because we have already pre-written and tested code.

Program Listing

#include <iostream>

using namespace std;

void display_message();

int main()
{
display_message();
}

void display_message()
{
cout << "\tWelcome To C++";
}

No comments:

Post a Comment