C++ Hello World

email me

Compiled in Visual Studio 2017.

#include "stdafx.h"
#include<iostream>
#include<string></string></iostream>

using namespace std;

// METHOD 1
void messages (void)
{
// initialize strings
string xString1;

// output message
xString1 = "Hello World! \n\nWelcome to console apps.\n\n";
cout << xString1 << endl;

}

// METHOD 2
void wait (void)
{
string xString2;

//output message
xString2 = "Press any key to continue...";
cout << xString2 << endl;

// wait for keypress
cin.get();

}

// ENTRY POINT - PROGRAM GOVERNOR
int main()

{
// call messages
messages();

// call wait
wait();

}