Hi again; actually, the problem is that I don't get either warnings or errors, that is why I couldn't understand what was going on.
At this point I'll pass directly to C++ next. I have a working C code for now and that what I needed to go on with my work.
I'll post a solution once I port my C code into a real 100% C++
Thank you for the help
S.