Java would not solve your problem, this is an error in your algorithm that a debugger or valgrind would have also found. Nothing strange here.syntonica wrote:NO_OF_NODES is a #define.
Oh crap... it's my indices. I just replaced them all with hard values and no crash...
...sigh...
Back to the drawing board... Can I go back to Java now?
Sorry for my frustration spilling out onto this board. But having to learn a new IDE (Xcode) AND a new language extension (c++) at the same time is driving me spare. It makes me want to kick a puppy at times.
And using std::vector is to simplify your memory management. The fact that you don't know that they would be easier for you points to a lack of basic understanding of C++. Stop trying to solve things that you don't understand (as I've said, your DSP code would crash in EXACTLY the same way in Java, so you don't master DSP code either), start with the basics: learn C++11 first.