My understanding appears to be wrong; in the following snippet I define a Print as a routine but when I call it from within Main nothing happens; am I completely on the wrong track here about sub routines? I appreciate it is a silly bit of code but I am trying to understand calling a defined routine from another.
Code:
#include <windows.h>
#include <iostream>
#include "ShortColours.h"
using namespace std;
int Print()
{cout<<"dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"<<'\n';
for(int x(1);x<20;x++)
cout<<"John"<<'\n';
return 0;
}
int main ()
{
Print;
return 0;
}