function being skipped

I'm sure it's something simple, but why is my printNewLine function being skipped?


#include<iostream>
using namespace std;

void printStar(int);
void printNewLine();

int main()
{
int side;

cout << "Enter side: ";
cin >> side;

for (int j = 0; j < side; j++)
{
printStar(side);
}
printNewLine();

cout << "PROGRAM ENDS" << endl;


return 0;
}

void printStar(int side)
{
cout << "*";
}

void printNewLine()
{
cout << endl;
}

I get the ***** that equals the number input by user, but no newline. I feel like an idiot. Any help would be great. Thanks.
It works fine for me.
There is no need to pass side to printStar if you are calling it from a loop like you are. Also, you are getting a newline.
*****PROGRAM ENDS
would display unless you had the printNewLine() call before you print PROGRAM ENDS
Wow. I feel even more stupid now. You guys are right. Sorry to waste you time. It's been a long day. I was looking for a blank line after the ***** for some reason. Thanks.
Topic archived. No new replies allowed.