First time here? Check out the FAQ!
answered 2014-11-12 03:14:57 -0600
Finally I could solve the problem.
I needed declare dinamically the int:
int *idx = nullptr; // new pointer declared idx = new int(); // memory dynamically allocated
Now it's working propertly!