Random Number GodsRNG · Enemy Territory · Battlefield · D&D
Friday BF64 + Sunday D&D

Check the calendar. ET pubs running the new Frostbite rotation all week.

Pitfalls to avoid with learning C++ coming from C.

preview

Hello, I am wanting to learn C++, I'm abit stuck around how to go about learning it. I have some background in C, I have 1 I think I can say largish scale project that I have made with it, so im semi confident. Defo dont know everything about it through. (actually editing this I didn't use std so I really don't know much about it, through I understand some of it)

From there I have background in languages like python, rust, javascript, etc. I tend to learn best by just doing and google syntax as I go however C++ has alot of ways todo stuff, some some stuff I havent seen before and you can just code straght C as c++ and have it work. Because of this I am wanting to learn to write C++ well and not end up writing terrible C++ code that some where C and C++ frangensten.

Mostly part that worries me is around classes and sub classes as its an area I haven't touched much, I did abit of c# (unity) when I was new to programming so i know rough idea but I was so new I dont know alot. I also have used rust with structs and impls but its not really same thing.

I am also worried about areas I might miss and do incorrectly (messy), for example using pointers instead of references as there appears to be many ways todo things unlike most lanauages I've used before.

I suppose I am asking for a way to learn good C++ programming pactaise, like a list of things to avoid or even better away to spot how to avoid them? I'd really prefer not to read tons but if its really a must do to get best results I can.

I get the feeling some amount of this is being over paranoid that isn't justifed, I tend to find it hard to get an idea with this sort of stuff as words dont mean alot compared to doing I've found lol. (could go here about how I should probs read more of other peoples code but thats another ramble lol)