// Native_Void_Functions.cpp : Defines the entry point for the console application. /* ______________________________________________________ CS 121 LESSON 6: VOID FUNCTIONS NATIVE CODE VERSION Ron Kessler Created 1/4/2017 This solution introduces functions Functions are blocks of code that do a job for us. They are called functions when the are NOT inside of a class. When they are inside a class we call them Methods. They do/act the same. This app calls my DisplayWelcome function to print a message. The code is inside a function and not in the main function. You create blocks of code like this any time you need to access code from more than one place in your project. Functions are used to break up code blocks into logical pieces to make it easier to maintain and re-use your code. This function is marked void which means it is not returning any answer/result to the code that called it. Run with CTL-F5 */ #include "stdafx.h" #include using namespace std; void DisplayWelcome (); //define the function framework here int main() { DisplayWelcome (); //call my custom function return 0; } //my helper function. Make sure it is not inside main() void DisplayWelcome () { cout << ("_____________________________________________\n"); cout << ("Welcome to your friendly Investment Planner.\n"); cout << ("_____________________________________________\n\n\n"); return; //all done so return to the code that called this guy }