How can I learn C++ with UE4?

Can’t really recommend this way, but this is a personal preference.
I started programming with c++ and I think the best way is to start with a hard language. My fellow students started with Java, but afterwards they also say starting with c++ would have been better. Because, when you learn something like Java or c#, you accustom to the easy memory management and switching afterwards is hard. But like I said, this topic is highly subjective.

I would definitely buy a book if you want to learn c++ the right way (like the other posters already suggested).

Yes I agree.

I also learned it by direct trial & error programming and by copying and modifying examples. It’s not a bad approach, as I was able to indeed write programs and fix errors by trial and error. But after some time I also decided to buy a book and after reading it I really understood the language.
For example I didn’t know what the symbol = &variable (make pointer) and = variable (dereference pointer) was, but it didn’t really matter as the compiler will tell you when you use the false one, and then you just swap it with the other. But of course on even slightly bigger applications or when you write something from scratch, you will get errors this way, and as you don’t have an understanding you can’t easily debug it.
As long as he doesn’t want to include external libraries (especially C libraries), use more advanced UE4 libraries like FSocket
or if he doesn’t need to use slightly complex programming patterns, he doesn’t really need to buy a book - but then he also could just use blueprints.

But I wouldn’t recommend buying a very theoretical book. I for example had one which explained everything in a practical game “fashion”, so there were Player classes, member variables like HP and so on… unfortunately it’s only available in german.

Watch my tutorial https://youtu.be/OFQ6UQxj1jc you learn it for sure, and for multiplayer games

I wrote a C++ tutorial for Unreal Engine, based on the following principles:

  • Wrote for beginners
  • Learn C++ from within Unreal Engine
  • Using an easy to acquire knowledge (the blueprints) to support your learning of a more complex concept (C++ in Unreal Engine)
  • Focus on good practices right from the start
  • Make a component you’ll reuse in your future projects (a powerful camera)

Have a look and let me know what you think:

[Learn C++ in Unreal Engine 4 by making a powerful camera

Head image Camera - small.jpg](https://benjamin-bouchet.com/tutorial/unreal-engine-4-cpp-camera/)

In my opinion, the C++ used inside Unreal is much more easy than “pure” C++. Is like a C# with pointers because you don’t have to worry (too much) about memory management and the UE framework provides you a lot of useful things. I mean, if you did not know c++ and you learn c++ with unreal engine don’t think that you are a c++ programmer, because probably you aren’t.

I could not disagree more lol :slight_smile:
I mean if you want to learn something as complex as programming (and I’m not just saying “a programming language”) then you need to start somewhere. Right?
How about you, are you a developer? If yes, did you start somewhere?

So that’s my whole point: have yourself a project, as small as possible, and use the drive of making something you like to help with the struggle of learning. My tutorial intends to give bases and clarify concepts. After that the road is still long, but the most important is that you are already driving on that road.

What I meant is if you started C++ programming with Unreal you’ll become a Unreal C++ Programmer. Then, you include C++ as one of your skills and you find a job as C++ programmer doing… I dont know… doing machine learning stuff for example. Probably you will have to handle with a lot of things Unreal really handle for you.

My point is, if your only c++ background as programmer is what you learned using Unreal, in my opinion (<– I want to highlight this), you missed some things on the way. Obviously if the read some books, videos, tutorials, courses… starting C++ with Unreal is as good start as other (probably better, because would be funnier)

I said that because I found few programmers in my last job who did know what’s a rvalue ref, move constructor or trying to use the templated unreal’s Cast outside of unreal environment

I started with the very basics in C++ classes with iostream only. What is a constructor and de-constructor, pointers, dangling references, templates and all that. When I got to Unreal I noticed how it was less about knowing C++ but more about understanding how Unreal makes use of macros. The rest is just learning the enormous code-base where I just scratched the surface so far.

Learning C++ from within Unreal Engine may give you some false idea of what you are capable of in C++. You end up in a strange place between C# and C++ but as long as you are aware of this then it is fine.

Yep I get your point clearly. Although I like to believe people should change domain of application if they want to. I think one can keep learning his whole life (only if he wants too, obviously).

I’m very strong on that feeling, cause you see I’ve been working on search engine, websites, desktop apps, client-server stuff and other headache-kinda-things, and since I’m a kid I always wanted to make games (my first coding at 12 was a game btw). Took me 20 years before I made the decision. So yeah I guess I want to shout out: do it if you want it, won’t be easy, but just go for it.