Void Functions

Pages: 12
closed account (S6k9GNh0)
in void rectangle (ofstream &fout, char ch , int x, int y), you call line completely incorrectly. 1) num isn't declared anywhere. 2) Your missing an entire parameter. And I don't understand why any of this matters. line() or rectangle() is never going to be called.
closed account (ShUk4iN6)
what do you mean by line() or rectangle() is never going to be called
You are not calling them in main
closed account (ShUk4iN6)
something like this?


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
int main()
{
	ifstream fin;
	ofstream fout;
	fin.open("animals.dat");
	int i,j,y;

void line(ofstream &fout, char ch, int x);

void rectangle (ofstream &fout, char ch , int x, int y);
	for(int j=1; j=y; j++)
	{
		cout<<endl<<endl;
		cout<<endl<<endl;
	}
		return 0;
}
No, you should call them. Not declare them
http://www.cplusplus.com/doc/tutorial/functions/
Topic archived. No new replies allowed.
Pages: 12