Matrix help

i have this code here that was provided by my teacher

1
2
8. const int SIZE = 50;
9. typedef double[SIZE][SIZE] Matrix;


however, this is what i get for line 9, not sure what i'm doing wrong

lc.cpp:9: error: expected unqualified-id before â[â token
It should actually be:

typedef double Matrix[SIZE][SIZE];
Well thats what I thought but that was the code we were given, and from that code we are supposed to define different Matrices such as

Matrix a;
Matrix b;
Matrix c;
...

This is confusing me...
and then pass Matrix a and Matrix b to a function called

Matrix multiply(Matrix a, Matrix b)
Is that the function spec for multiply() that the teacher gave you?

It's returning an array, which you can't do.

Jim
Topic archived. No new replies allowed.