I would love to learn C++
I already know alot about Lua, made some GMod addons etc.
The other posts that have been made here about learning c++ are several years old, 5,7 years and more.
And some of the links that people posted are dead or changed. The video tutorials i found so far are pretty old too and show old software, old coding. Its all different now when i try it... (especially the compiling at the end)
So is there something fresh/still working that i can use to learn C++? And good would be as well to learn how to compile it..i saw compiling software which i dont understand at all, and opening it through the cmd didnt worked the whole time..
lua in gmod is so freaking easy compared to this its unreal
Why do you want to learn C++? Any particular reason, or does it just seem like a natural progression?
I ask because, like you said, the transition from Lua to C++ is a pretty big leap. Concepts and structures are the same of course, but there is some massive syntactical differences and C++ in particular can be fairly unforgiving for tracking that sort of stuff down. C++ is very powerful, but that power comes at a cost.
I know this isn't what you asked for, but I'd like to suggest learning C# first instead. It is still a true C style language, but its a bit more forgiving, there's a ton of great resources for it, and its not nearly as old/fragmented of a language. It'd be a good transition on the road to C++, if you can learn it and translate your skills from Lua to it, then you can basically learn anything Plus its much easier to get into with Unity, than say C++ with Unreal.
If you'd like to learn C++ you'll want to download a IDE like visual studio or code::blocks.
Visual studio is super easy to set up and use, there's plenty of tutorials for it on youtube.
I can't comment on learning c# first or LUA since I'm a native c++ programmer, and I found it super intuitive and easy.
I got super interested in Artifical Intelligence latley, and lua sure isnt a language for that..but C++ seems like a good language for it
im already using Visual Studio code, which (now i found out) is not the same as visual studio
What learning methods do you like?
I don't think C++ is as relevant anymore as it was just 5 years ago. Maybe also consider learning something more modern like Rust or Go instead.
If you aim for a career in programming you should try multiple languages anyway and find whatever suits your programming style best.
No, not really. C++ is a very complicated language, and unless you're an expert writing something that absolutely requires it, it's only a hindrance. It's not a very friendly language, and most course / tutorial -like material online is either outdated, just plain wrong or often both.
Something like C# or Java/Kotlin/Scala is a much better choice, especially if you're new to programming in general. Depending on what you mean by artificial intelligence, you might also want to look into Python. It's pretty close to Lua in some respects, and it's very popular for scientific computing and AI/machine learning research.
As someone in the technical workplace, C++ and Java are pretty much the only languages still used in program and software development. Although they may be going out-of-style in the developer community, most companies will continue to use them for decades to come due to legacy code support and the availability of developers familiar with the language.
What? No offense but this is totally wrong, C#, JavaScript, Lua, Python, are all very prevalent languages in development right now, and none of those are particularly "stylish" languages at this point, they're tried and true.
C# and Python perhaps for smaller applications, Lua as a scripting outlet - I purposefully excluded webdev from my previous post since there are a host of languages dedicated to that widely used (PHP, JS, Node), but I have never run into anything other than C++, C#, and Java in software development for a number of older, established companies that have hordes of legacy software and programs. See any major media/gaming corporation or government contractor for reference.
Of course you're not gonna see anything other than C++/C#/Java if you work with legacy.
If you work on newer projects you will also encounter other languages.
If you want to learn C++, I'd suggest basically any beginner book by O'Reilly, and then to really sink your teeth into some of the syntax, I'd suggest using LazyFoo's SDL2 tutorial and trying to make some stuff that way
I'd be interested to hear what area of business are you working in. Desktop applications are (somewhat unfortunately) a dying breed, and other than games and productivity applications (like photo/video/audio editors and 3D modelling software) there is really no need to write desktop applications in C++ anymore. For the few internal desktop applications that businesses are still building C# and Java are the default choices, because of the availability of talent (or rather, cheap third-world developers) and speed of development. Both languages are also very popular for enterprise backend services, which depending on your definition might or might not count as webdev.
I work at a consultancy with a pretty diverse customer portfolio, and C/C++ is very rarely used - only for embedded development, extremely low level and high performance code where every cycle counts, or when someone needs to port an already existing scripting language / runtime to a new platform.
Sure, but you have to keep in mind that established companies are slow to change and often build on top of legacy code for decades and replace sections as needed.
i learned lua really well with youtube tutorials by codeblue. i tryd stuff like websides that explain you the stuff, which didnt worked well..so seeing it in a video and typing after them for the basics works good for me
Government contract work - the majority of applications are legacy so I rarely get to work outside of C and Java. Even new projects follow the same structure for the sake of consistency and integration. Even in freelance app work, however, I've only seen C# and Haskall at the most "modern" - with how new Rust and go are, I doubt they'll make themselves into the major commercial market place for a long time.
Honestly I think your best bet is to find a good C++ book (probably for 11/14) and then tack on anything else from online sources. I've been learning C++ for the last 8 years so I don't really know of a good starting point, partly due to the new standards and partly because I don't think the way I learned C++ was very good.
As an aside, at my current workplace we are transitioning a C# code base into a C++ one due to the performance ramifications.
C and C++ get used all the time for extending current languages either in the form of commits to the language or modules for the purposes of speed.
C++ is the first language I learnt, and I would argue that its main unforgiving areas are pointers and doing stuff with Windows. The console aspect of C++ one first attempts is actually pretty easy, and I think people do exaggerate the difficulty of C++. I mean, when I was 15, I made a version of Gorillaz, that game where you threw bananas to blow up an opponent, and I made the levels randomly generate, etc.
Still, saying all of that, I do think when you want to play with threads, pointers and Windows, C++ can be rather complex and unintuitive.
I'm not saying C++ is unlearnable or useless, but my argument is that for a novice to intermediate programmer it doesn't offer any benefits over other languages. When you're new to programming in general, the last thing you want to do is to write headers, fight with compiler and linker settings, decipher 10 page long template errors or face subtle memory corruption errors. These things are largely completely unnecessary in more modern languages (even low level languages). C++ leads inexperienced users towards a pit of despair.
The worst thing that can happen to a person who's starting to get properly into programming is losing motivation because of completely unnecessary difficulties.
If you're still trying to learn to write a version of Pong, it doesn't matter if your language is fast enough for AAA games. On modern hardware C# and JVM languages are easily fast enough for any game an individual could reasonably make.
I'm a huge fan of Rust these days as it fixes most issues C++ has, but I still wouldn't recommend it to novices because it doesn't offer benefits over high level languages for those users.
Let's consider a game, say Rust or something not so AAA. It was made in C# I believe. Imagine it was made using C++ what would be the major differences?
It's a bit more complicated than that - Rust is running on Unity, which is an engine written in C++, but the game logic is written in C#. It's not really possible to evaluate theoretical performance differences, as you can't really make games with Unity without writing C# (or using an another language implemented on top of it). Let's imagine for a moment that you could, though. The game would run a bit faster and use less RAM, but it would also likely be slower to develop. Most importantly, I don't believe using C# places any creative or design constraints on the game - just using C++ wouldn't enable massively higher player counts or map sizes, dramatically better graphics or anything like that.
It doesn't really make sense to compare performance between languages, anyway. You can try to compare idiomatic implementations or maximally optimized versions of the same program, but perfect code is rare in the real world, and oftentimes people can't agree on what's idiomatic.
well the thing is that rust uses il2cpp so it eventually compiles to c++ anyway.. and it's built on top of unity which is itself written in c++
but i've heard that a lot of the performance problems in unity are caused by the garbage collector, so i suppose if you could eliminate that you would get better performance
c++ tends to be more painful to write though
I mostly use C(++) for embedded systems. I'm not quite sure what environment I prefer yet, but for some reason I feel like I can do so, so much more with those languages than C#, even though the latter is of course a lot easier to use
I've only had experience with Python as it was fun to tinker around with it but it's pretty boring and hackyish which is not my type. I want to learn a language to smoothly and use with an engine make games with and one that is not extremely hard to learn. C# and unity are the way to go right?
c# and unity are good yeah
I think the best way of learning C++ is by learning C first, undertaking few projects in C and really mastering it before moving on to C++.
I don't know why you are disagreeing but let me list my reasons and hopefully hear yours.
C is pretty small language and everything you will learn using it will come in handy when using C++. You don't want to have lots of advanced C++ features on your plate to deal with when you still have to learn what raw pointers are and how they work, still have to get up-close and personal with your clib and syscalls, learn general memory management and the reasons for it, learn some about binary formats and loaders/linkers, and obviously things like control flow, branching and looping constructs, general programming logic.
Now imagine you start out by trying to wrestle C++ without knowing any of that. You have to deal with all of the above and also smart pointers, STL containers/iterators/algorithms, more advanced type system, OOP and all it has to offer, C++ flavor of OOP with its multiple inheritance/copy-move constructors-overrides/destructor semantics, another set of memory management calls new/delete, templates, namespaces, more unclear memory model with all the object metadata and virtual dispatch tables and whatnot, std::function and lambdas, exceptions and proper exception handling, and a lot more that escapes me now.
I don't think anyone who tries to learn C++ without having any experience in C will have a good or fun time doing it.
The OP post was about pages/ways to learn it not too hard..why did this turned into a conversation about..everything else?
If your focus is to start learning about AI, than learning C++ shouldn't be your primary goal. You should be focused on learning the overarching concepts and theory of AI. Furthermore, you will probably learn quite a bit about machine learning, as it's one of the most prevalent approaches to AI in this day and age. In that case you would be better of using Python or MATLAB, instead of fussing over why your C++ code won't compile.
Sorry, you need to Log In to post a reply to this thread.