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  ww.  jav  a 2  s  .co m*/
{  

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

     return 0; 
} 

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

Result

Related Topic