Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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!