Reputation: 15
I'm reading a bmp image. So my matrix is dynamic. I'm learning its columns and rows size in runtime. I want to use this dynamic matrix as a parameter of a function.
func(w,h, inMatrix, outMatrix);
I want to call my function like this.
void func(int w,int h,?,?)
{
....
outMatrix[x][y].R=inMatrix[x][y].R*someThing;
....
}
How can I define this function?
So ?=?
Thanks for helping!
Upvotes: 0
Views: 142
Reputation: 63
Use a pointer to an object that wraps that behaviour? or use a reference to the matrix. I would avoid passing by copy due to performance issues.
Upvotes: 1