Should be simple, but.... 
Author Message
 Should be simple, but....

Ok, I'm using gcc 2.7.2 and I want to do something soooo simple...

I want to create a function that will multiply together 2 4X4 matrices,
in my case, 2 dimensional arrays.

So, I've got a fuction with the local vars

double x[4][4];
double y[4][4];

and I fill them up with values.  Now, I've written the function to do the
multiplication, but I can't seem to please my compiler with the function
header.  I've got:

void mulMat(double m1[4][4], double m2[4][4])
{
  ...do the math...

Quote:
}

and my compiler just returns the error "syntax error at or near type work
"double" "

Now, my book clearly states I'm allowed to do this, so why won't it let me!!!?
Any responses my e-mail would be most appreciated.

__
Devin Redlich                          Phone (604) 472-6466
University of Victoria                 http://www.*-*-*.com/ ~dredlich



Wed, 12 Aug 1998 03:00:00 GMT  
 Should be simple, but....

writes:
 >
 > Ok, I'm using gcc 2.7.2 and I want to do something soooo simple...
 >
 > I want to create a function that will multiply together 2 4X4 matrices,
 > in my case, 2 dimensional arrays.
 >
 > So, I've got a fuction with the local vars
 >
 > double x[4][4];
 > double y[4][4];
 >
 > and I fill them up with values.  Now, I've written the function to do the
 > multiplication, but I can't seem to please my compiler with the function
 > header.  I've got:
 >
 > void mulMat(double m1[4][4], double m2[4][4])
 > {
 >   ...do the math...
 > }
 >
 > and my compiler just returns the error "syntax error at or near type work
 > "double" "
 >
 > Now, my book clearly states I'm allowed to do this, so why won't it let me!!!?
 > Any responses my e-mail would be most appreciated.
 >
 > __
 > Devin Redlich                          Phone (604) 472-6466
 > University of Victoria                 http://gulf.uvic.ca/~dredlich

 >
 >
This may be a stupid suggestion, but are you sure that the preceding
procedure declaration was terminated properly?
--

Pi Technology Ltd.            +44 (0)1223 441434
Opinions expressed were mine at the time of posting,
otherwise all possible disclaimers apply.


Tue, 18 Aug 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. simple question, but I am stuck.

2. I am a retard (perhaps a simple problem??)

3. a very simple problem about # include files but i am a beginer

4. Simple Question I am sure !!!!!

5. I am new to programming and am lost

6. simple lib and simple dll

7. Calling a simple FORTRAN subroutine from my simple C program

8. Simple problem across processes - need simplest answer

9. Simple ATL Com object problem on simplest examples

10. Simple But Not Too Simple

11. Simple MAPI: Not so simple:(

12. a simple simple question...

 

 
Powered by phpBB® Forum Software