Skip navigation.
 
ml#define issues
FROM : Aaron Boothello
DATE : Sat Apr 16 09:44:57 2005

Hey guys,
Thanks for your help on the dynamic arrays issue i was having.. managed to get it sorted out...

Here's another issue i ran into. I should probably let you guys know that im porting some C++ code into a cocoa app.

So the C++ code has dome definition and macros associated with them. the code looks like:

typedef double matrix[16]

#define setvalue(matrix, row, col, value) ( matrix[row+col] = value)  //roughly looks like this
#define getvalue(matrix, row, col) (matrix[row+col])


the 'macros' are called as follows:
matrx m;
double a,b,c;
a = row;
b = col;
c = value;

setvalue(m,a,b,c);


Every time i try to compile the code, i get a 'incompatible type in assignment' (for the setValue calls)

What am i doing wrong here ? Ive gone through the documentation and cant seem to figure it out.

Thanks,
Aaron

Related mailsAuthorDate
ml#define issues Aaron Boothello Apr 16, 09:44
mlRe: #define issues Justin Spahr-Summe… Apr 16, 10:09
mlRe: #define issues Aaron Boothello Apr 16, 10:13
mlRe: #define issues p3consulting Apr 16, 10:25
mlRe: #define issues Aaron Boothello Apr 16, 10:35
mlRe: #define issues Justin Spahr-Summe… Apr 16, 11:10
mlRe: #define issues Aaron Boothello Apr 16, 12:58
mlRe: #define issues Cameron Hayne Apr 17, 06:47
mlRe: #define issues Andrew White Apr 18, 05:54
mlRe: #define issues Michael Rothwell Apr 22, 04:37
mlRe: #define issues Steve Checkoway Apr 26, 07:04