When you call void function in main function, you have to write down actual parameters. For example, in your first void function
1 2 3 4 5 6
|
void initialize(int x, int y, char z)
{
x=0;
y=0;
z=' ';
}
|
So when you calling, the form must be something like this: initialize(x, y, z); not necessary the same name, may be initialize(a, b, c);
Furthermore, you have to declare the variables in main function.
For example, with the above definition of your void func. In main function, there should be:
1 2 3
|
int x,y;
char z;
intialize(x, y, z);
|
Similarly, you should do like this for your next void functions when calling. Beside, notice about the variables, whether using value variable or reference variable. In this case, if you want to print the value of x, y, z after executing the above void function, you should declare like this:
void intialize(int& x, int& y, char& z)
Your should read more about function.