It seems you're having confusion with your pline() function:
1) Your pline() function has no prototype.
2) Your first call to your pline() function does not have valid agruments:
void pline(char ch,int i); //Put this above main() !
Why do you have
in main()? When you're calling a function, don't declare the arguments within the function call. Instead, pass it like:
void pline(char ch '#',int i=40); //We don't like this
3) Your second call to the pline() function has no arguments:
pline('#',40); //We like this
The pline() function takes two arguments, so you'll need to pass to it two arguments.
By the way, I *think* you meant:
void pline(char ch,int i)
for(int x=0;x<=i;x++) //loop 40 times (or whatever number gets passed to it)