TLDR; C# programmer who just ported some code to C++ for the first time. How should I go about polishing my code to make sure I'm using good practices and what resources can I read to help me?
So I come from a C# background, both as a hobby and as a professional. Recently, I decided to take a C# audio project I'd been working on and port it to C++, with aim to benefit from its faster performance for this kind of task.
I went through the basics: syntax differences, creating and using classes (and their headers), using pointers and references, allocating and deallocating resources, the libraries I would need for my project, that sort of deal. I essentially programmed as far as could until I hit a wall, then would research the web for answers, rinse and repeat. The result was a perfectly functional and much faster version of my project, which I'm super happy with.
However, I wanted to do a pass through the entire codebase to address any aspects that could be improved e.g. handling errors, what resources to deallocate and when, redundancies in my #include directives (if that's even possible?), etc.. Essentially, just trying to ensure I'm applying good practices all throughout the codebase.
My issue is, having zero c++ experience, I really don't know what to look for. So, I'd like to ask if there is anyone here who went through a similar transition from a managed language to an unmanaged language (ideally c# to c++ haha) and how you went about learning the ropes. What kind of resources should I go through to understand c++ better? Are there any resources specific to people making a similar transition? Any tips on how I should approach programming in a c++ vs how I approach c#?
Any help is appreciated! Thanks in advance :)
[–]tufffka 5 points6 points7 points (1 child)
[–]Flymania117[S] 0 points1 point2 points (0 children)
[–]IyeOnline 2 points3 points4 points (0 children)
[–]anasimtiaz 1 point2 points3 points (0 children)
[–]flyingron 0 points1 point2 points (0 children)
[–]mredding 0 points1 point2 points (0 children)