"Large int anomalies in an exported 2d array" not sure where they came from (genetic programming)

My problem is my edit distance values are stored in a 2d array of ints and exported to a .csv and the ones at the end are rather LARGE.

The the edit distance max should be around 2000 but i am getting values of 1-100million, the weird thing is that I have checked back through my function and tested various parts of it and still dont understand where it is going wrong i thought it could be my memcpy and memmove parts but i have had no luck.

Last edited on
1
2
3
// Compares the arity ar2 to ar1.
//if ((ar1 - ar2) > (ar2 - ar1)) //¿why so obfuscated?
if( ar1>ar2 )
Look for undefined behaviour (like accessing arrays out of bounds)
You may want to upload your code to github.

Also, indent your code properly.
Last edited on
Okay i fixed the indentation and looked into the out of bounds yes you were correct but what if im getting 0's in the wrong place or the same place everytime i run any ideas on that?

Thanks for the first bit of info though.

Don't worry i sorted it out than you or the insight though buddy :)
Last edited on
Topic archived. No new replies allowed.