Cpp - Display console message in main function and your own function

Description

Display console message in main function and your own function

Demo

#include <iostream> 
using namespace std; 
void pause();        // Prototype 
int main() /*  w  w w.j ava  2  s  .c  o  m*/
{  

     cout << endl << "Dear reader, " << endl << "have a "; 
     pause(); 
     cout << "!" << endl; 

     return 0; 
} 

void pause() 
{ 
     cout << "BREAK"; 
}

Result

Related Topic