I am trying to write this program with two functions but I keep getting the compiling error "cannot convert parameter 2 from 'void' to 'int'. I do know what this means but unfortunately I do not know how to remedy it. I've pasted the code below and if anyone can help me out, that would be excellent.
#include <fstream>
using namespace std;
ofstream fout;
ifstream fin;
void line(char ch, int num)
{
int i=0;
while(i<=num)
{
i++;
fout << ch;
}
return;
}
void rectangle(char ch, int x, int y)
{
int i=0;
while(i<=y)
{
i++;
fout << x << "\n";
}
return;
}