![]() |
![]() | #2 |
Студент Join Date: 06 2002 Location: Yerevan
Posts: 258
Downloads: 0 Uploads: 0
Reputation: 0 | 0 | ![]()
What do you mean by "matrix"? I mean what c++ construction? And what's the reason you don't wanna use pointers (or arrays, which are basically the same)?? Just final note, whatever you use (unless you assign a separate variable to each element), it will contain pointers in some form.
__________________ http://www.d-brane.com |
![]() |
![]() | #6 |
Студент Join Date: 06 2002 Location: Yerevan
Posts: 258
Downloads: 0 Uploads: 0
Reputation: 0 | 0 | ![]()
You have to use pointers. In other words this means - NO way. All ways I can think of involves pointers in this or other form - pointers, arrays, even functions with indefinite number of arguments, etc. Reason - to store an array in a program you never store each element in a different variable, you just store the start position, and then just do small steps to get others, or store a link in each element to the other one. P.S. Maybe I'm not getting your question right, so you should consider rephrasing it, showing the cpp code of the matrix you want to pass and then asking the same question. |
![]() |
![]() | #7 |
Младенец Join Date: 07 2002 Location: Yerevan
Posts: 28
Downloads: 0 Uploads: 0
Reputation: 0 | 0 | ![]()
Create a class that incapsulates 2D matrix functionality and write copy constructor. But I would not recommend doing it because will work very inefficient(big object copying), the same result can be achieved by using const Matrix& as an argument to the function instead. |
![]() |
Sponsored Links |