a question of style
- From: "questions?" <universal_used@xxxxxxxxxxx>
- Date: 28 Feb 2006 10:48:00 -0800
I am curious about whether I should do this
say I want to calculate dot product of two matrix(4X4,fixed)
I do two ways
1)
void dot_product(double A[4][4] , double B[4][4], double result[4][4]){
blah blah
}
my results are automatically given back in the matrix result[4][4]
or
2)
double [4][4] dot_product(double A[4][4],double B[4][4]){
double result[4][4];
blah blah
return result;
}
for the second type, result is local variable and will be released
after function call, Will the program have problem to access?
Are there better and neat way to this problem?
Thanks
.
- Follow-Ups:
- Re: a question of style
- From: Artie Gold
- Re: a question of style
- Prev by Date: Re: Hellp with type promotion
- Next by Date: Re: Whats the use of %p
- Previous by thread: Make fast money in the mail order buisness!
- Next by thread: Re: a question of style
- Index(es):