Currently I am working on a code best described as C code living in C++ body. However I haven't been able to convince power that be to re-factor on ground of ease of maintenance.
What in your opinion is the best argument for refactoring the code.
The only way to get a business to agree to a refactor is to show them it will save them money. I dont mean just tell them, you need to be able to say we will save x days on bug type y saving us z pounds.Or in terms of savings when it comes to adding features.
It's all about the money.
Edit: I'm assuming this code is now live or late stage development. Refactoring during dev is a whole different question.
Just do it as you go. In my experience, very few projects warrant a wholesale re-factoring of the code as a separate project. If there are pieces of the code you would never get to because they don't need modification, then the value of refactoring them is probably dubious anyway.
You don't tell the taxi driver how to drive his car.
You don't tell the hairdresser how to cut your hairs.
You don't tell a coder how to work with his code.
If you think your code needs refactoring. Refactor it.
I can think of three arguments for refactoring that I have used that have actually convinced sceptical directors.
Using arguments like "the code is badly written" and "its really hard to understand the code" do not typically work.
Most reasons are dealing with probabilities which makes them difficult to count, especially if the willingness to take risks is high. Better maintenance? If nothing goes wrong, you won't have to touch it. Better portability? If we never change the running system, we won't need it. Guaranteed future? Who knows if we will need the functionality of this code in a few years time at all? Code's a dead end? Who knows if we will ever build code on top of that crap. Security issues? We don't believe in evil hackers. Programmers having fun to make something bright and shiny? We don't pay them to have fun. Easier to manage? So we would need less qualified programmers, paying them less money? Ahh, now you've got a point...!
The last argument was a joke, but I think you will need to tackle your request with real benefits and depending on what's high on the agenda of your bosses you will need different arguments. My list above is maybe useful as a starting point...
Writing code is much like growing a garden - it needs to be pruned and tendered while growing often or it will just turn into an ugly mess which no one will want or even touch with fear some twig will break and crash the whole bush.
As with everything examples are the best way. Some examples you can give:
To put this simply if you can draw a cause and effect line and illustrate with bug tracker records, e-mails and other forms of proof that indicate that there is a problem that should motivate refactoring quite easily. "It shouldn't have taken 2 weeks to implement feature X!"
There are tools out there that can help you motivate your refactoring too. They can draw dependency graphs or show code complexity, duplication etc. If a tool reports thousands of warnings and management ignores it then there is no hope for management.
These focus on code structure changes. Small refactorings like naming conventions and pulling up into base classes are things that I consider part of my job, and I don't ask permission to do it. If it's going to impact productivity or delivery date significantly then it is worth asking permission.