Void Functions

Pages: 12
computerquip (1842)
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.
thebeast (34)
what do you mean by line() or rectangle() is never going to be called
Bazzy (6275)
You are not calling them in main
thebeast (34)
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;
}
Bazzy (6275)
No, you should call them. Not declare them
http://www.cplusplus.com/doc/tutorial/functions/
Topic archived. No new replies allowed.
Pages: 12