Quote:Original post by Kustaz
Oh ok, thanks, how would I go about fixing it so it does pass by reference?
inline UINT ReduceMesh(PRECISION **OriginalMesh, UINT Dims, PRECISION **&NewMesh, UINT Factor)
That does look kind of weird, but if I got it wrong I'm sure someone will correct it.
Quote:And please, let fly with the other issues, but please be constructive about them (not just criticise for the sake of criticising).
Really just the usual admonition to take advantage of the C++ standard library, especially the container classes. Manual memory management usually isn't necessary in C++, and tends to be messy, error-prone, and hard to maintain.
In the nitpicky (but constructive, I hope!) category:
1. Use a typedef or template parameter for the scalar type, rather than a macro (I assume PRECISION is a #define)
2. You might consider a different name than 'precision', such as 'scalar' or 'real'
3. Maybe use the more conventional 'i' and 'j' instead of the 'cycle' variable names