D
David
Anyone,
Does anyonee now how to use the following outline to fill a matrix
with zeros and call on the first function in the following program?
void fill_with_zeros(int *mat){
mat=mat1=mat2=mat3;
return 0;
}
int main(void){
int mat;
mat= {0};
fill_with_zeros(*mat);
......
}
The first function is called on in main while mat is called into
fill_with_zeros. The syntax is killing me in my program. Also, the
matrix is a 3x3. If this isn't enough, I will just copy the entire
program on here next time I need to ask.
All I need the output to do is to print:
"About to fill Matrix1, Matrix2, and Matrix3 with zeros...
Matrix1:
0 0 0
0 0 0
0 0 0
Matrix2:
0 0 0
0 0 0
0 0 0
Matrix3:
0 0 0
0 0 0
0 0 0
"
I hope this is good enough.
Does anyonee now how to use the following outline to fill a matrix
with zeros and call on the first function in the following program?
void fill_with_zeros(int *mat){
mat=mat1=mat2=mat3;
return 0;
}
int main(void){
int mat;
mat= {0};
fill_with_zeros(*mat);
......
}
The first function is called on in main while mat is called into
fill_with_zeros. The syntax is killing me in my program. Also, the
matrix is a 3x3. If this isn't enough, I will just copy the entire
program on here next time I need to ask.
All I need the output to do is to print:
"About to fill Matrix1, Matrix2, and Matrix3 with zeros...
Matrix1:
0 0 0
0 0 0
0 0 0
Matrix2:
0 0 0
0 0 0
0 0 0
Matrix3:
0 0 0
0 0 0
0 0 0
"
I hope this is good enough.