Since I have ported a few C projects to C++ before I can relay my experiences:
I will guess that what you really means is "Make classes and objects from code that already works fine", when you say you are porting from C
to C++
. That is probably what you are doing. I imagine the reason you want to do the porting is to make the code more reusable and maintainable. Bear in mind I am assuming this is a medium to large sized project (at least 10000 LOC).
If so, then I can imagine some problems you will come up against, but are also problems that are encountered in C++ in general:
Newly introduced bugs when making it
'OO'**
As C is procedural, it is going to be a judgement call as to what is "reusable" in the sense of an object in C++. You will probably find sometimes that your initial observation was incorrect. Not because your code doesn't compile, but because the logic doesn't perform the same as it used to. In which case: Test, test, test (incrementally) and do all of your fancy refactoring with design patterns at the end, when you know that your basic C++ objects have not mangled the C program's original intended logic.
Memory management problems
C's malloc
and free
and C++'s new
and delete
do very different things. What your C++ object allocations are going will depend very much on how you have reinterpreted your understanding of what the C code is doing, and so you will need to be very skilled at both. But initially I would keep the malloc and free calls and just abstract them with C++ unless there is a very good reason to do otherwise. So once your classes are created and are allocating and deallocating memory your application will have memory leaks. This is a guarantee and the very reason why you must test incrementally.
Refactoring and Design Patterns
I think there is sometimes this temptation to go nuts with inheritance and design patterns to make the code more 'leet'. Try to resist this temptation at the start of the port because design patterns are essentially a way to optimise code so that it is more efficient and maintainable but it is much harder have to think about porting the C code to C++ AND think about design patterns AND refactoring AND "crap now it doesn't work" AND "I used the wrong design pattern before I must change it"... As you can see it can very quickly spiral out of control so focus on doing ONE thing at a time to keep the porting process bug free and easy on your mind so you don't get overwhelmed.
Globals
You will need to carve out the globals and figure out where to limit their scope. Try to preserve the meaning and function of the C code by creating simple C++ objects one at a time with nothing fancy in the way of namespaces, inheritance, design patterns etc. Again, something that I would suggest doing after your code is converted into classes.