I need to get this code working with gcc (it works with dev-c++)

This is a discussion on I need to get this code working with gcc (it works with dev-c++) within the C Programming forums, part of the General Programming Boards category; I don't know why it doesn't work. In dev-c++ I can do a search without any problems. In gcc it ...

Well the warning is telling you that you went to all the trouble to make a variable called sucesor and then don't ever use it. Whether you thought you needed it or not, I don't know.

Only one person, eh? I would've thought it would've taken three different people working in isolation and then combining their efforts to get something like this.

As to the error, the Windows->Linux part and fflush(stdin) is the key. fflush(stdin) is meaningless, according to the C standard. Windows uses it to discard extraneous input; Linux does not. If you plan to have this program work in Linux, you will have to use real input gathering routines -- which means no gets, and no fflush(stdin). What you want is most likely fgets.