FROM : Aaron Boothello
DATE : Sat Apr 16 10:13:50 2005
Oh yeah,
sorry that was a mistype in the email. theyre actually ints(sorry about that).
So the code actually looks like(with correction):
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;
int a,b
double 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)
-Aaron
-------------------------------------------------------
On Saturday, April 16, 2005, at 04:10PM, Justin Spahr-Summers <justin.<email_removed>> wrote:
>You can't access indices in an array with non-integer types. Cast the
>doubles to ints before accessing the array.
>
>On 4/16/05, Aaron Boothello <<email_removed>> wrote:
>> 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
> _______________________________________________
>Do not post admin requests to the list. They will be ignored.
>Cocoa-dev mailing list (<email_removed>)
>Help/Unsubscribe/Update your Subscription:
>http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
>This email sent to <email_removed>
>
>
DATE : Sat Apr 16 10:13:50 2005
Oh yeah,
sorry that was a mistype in the email. theyre actually ints(sorry about that).
So the code actually looks like(with correction):
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;
int a,b
double 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)
-Aaron
-------------------------------------------------------
On Saturday, April 16, 2005, at 04:10PM, Justin Spahr-Summers <justin.<email_removed>> wrote:
>You can't access indices in an array with non-integer types. Cast the
>doubles to ints before accessing the array.
>
>On 4/16/05, Aaron Boothello <<email_removed>> wrote:
>> 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
> _______________________________________________
>Do not post admin requests to the list. They will be ignored.
>Cocoa-dev mailing list (<email_removed>)
>Help/Unsubscribe/Update your Subscription:
>http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
>This email sent to <email_removed>
>
>
| Related mails | Author | Date |
|---|---|---|
| Aaron Boothello | Apr 16, 09:44 | |
| Justin Spahr-Summe… | Apr 16, 10:09 | |
| Aaron Boothello | Apr 16, 10:13 | |
| p3consulting | Apr 16, 10:25 | |
| Aaron Boothello | Apr 16, 10:35 | |
| Justin Spahr-Summe… | Apr 16, 11:10 | |
| Aaron Boothello | Apr 16, 12:58 | |
| Cameron Hayne | Apr 17, 06:47 | |
| Andrew White | Apr 18, 05:54 | |
| Michael Rothwell | Apr 22, 04:37 | |
| Steve Checkoway | Apr 26, 07:04 |






Cocoa mail archive

