Hello! What tools should i have or install to learn c++! Also, can anyone provide me a good website to learn c++?
Our comunity discussion group
our hell hunter playthrough
subscribe to our youtube channel for a massive audio game playthrouhh
You are not logged in. Please login or register.
AudioGames.net Forum → Developers room → Learning c++ as a blind user.
Hello! What tools should i have or install to learn c++! Also, can anyone provide me a good website to learn c++?
learncpp.com should be good.
if your willing to read books, you can read the c++ programming language book by Stroustrup, the c++ author himself. c/c++ compiler and a code / text editor should be good to get started
Do i need to install extra tools? Does Cpp need to be install?
yes of course.
if your using windows, install Microsoft visual studio with desktop development with c++. option.
you can write the code in notepad and save it with .cpp. open a developer command prompt (you will get it after you install visual studio.).
then run cl file.cpp
with that said, please follow mainstream guides. they are very few guides which are inaccessible, at least about programming.
I don't know how to setup that visual studio. Do you have guide?
i mean, in my openion, please learn how to understand self explanatory stuf. why dont you try downloading the installer and try on screen instructions, and if you still face any problems, then ask us?
Literally just follow the installer. You select the workloads you want, choose whether you want to download all components and install them or to download and install each component individually (I always choose to download all then install because IMO it's faster) and hit install. You can go to the individual components tab if you want to install more things that aren't in the individual workloads, but as a beginner to C++ you shouldn't need to. As said in prior posts, please use online tutorials or books to learn C++; I've yet to find a single book on C or C++ that is inaccessible, and I've got at least 15-20 books in my library on C and C++ alone, probably more than that. learncpp.com appears to be a good resource for getting started, just at a glance.
@7
isn't the c++ programming language by stroustrup accessible? That book is epub and i feel it is accessible. again, learncpp is very good resource, but i never hurd this forum talking about stroustrup's book except that in the resources list you made.
@8, yes, I've read through parts of it and it's very good, though it covers.... C++14 if I remember right, and not any of the newer standards. Though the newer standards don't dramatically change C++ from what it was when the book was written, so C++14 would probably be just as good a starting point.
@9
since we're at it I want to learn cpp but not sure, I have programming experience, from rust, and some C++, very, very tyny, barely, what confuses me mostly is the destructors and the ways how you can work around with operators, I remember people created some weird rules, the 0 rule, the 5 rule and a bunch of things, or was it called something else? Not sure, but those confused me so much, and recommendations? Will learncpp be enough?
also btw another C++ question always made me confused. When asining values, learncpp.com recommends using braces instead of =, why? Is there a reason? Or it's an old thing?
@10
destructors are simple. if you have any members alocated on heap, we can use destructor to clear those allocated resources. you'll put your resource clearing code such as delete x; delete y; etc, and all cleanup code in destructors. then program will execute that code before destroying the object.
about operators, you overload it using a operator function followed by the operator?
@11
Yeah to be clear I get the simple concept of destructors, What I don't understand is all the rules, Do I need to worry about them? OR are they things just for optomozation freaks/(Useful but not required?)
example is this
https://www.geeksforgeeks.org/rule-of-five-in-cpp/
why I'm saying this is that from all the info I can gather cpp is a nightmare of memory mess leakage hells so I need to enter while knowing, because I like to learn a language the hard way, sort of, hard way while trying to avoid common mistakes at least.
actually, i dont feel those are a must follow rules. those are probably made by some one from experience. you know? why would you even define functions outside a class which belongs to that class? especially memory management related functions outside a class is obviously a mess. since your telling you know rust, it shouldn't be hard for you to cleanly manage memory. in my openion, choose what is not messy for you from experience. those are just best practices made from people's experiences. again, i dont feel c++ is messy, you just need to understand memory management properly, which you probably would have since your rust programmer. also, for your code to be readable for every one, reading open source code and getting an intuition on whhy are they doing it can be fine.
Some of the destructor rules are things you need to always remember. For example, never, ever throw exceptions in destructors. Ever. That's undefined behavior. Some of the other rules are more obscure and your compiler should tell you if you've violated them.
As for initialization syntax, the braced initializer syntax does have some advantages; in particular, it forbids narrowing conversions. For example:
int x {7.9}; // Compile-time error: narrowing conversion because 7.9 is a double, but we're assigning to an integer, so we lose the .9
int x = 7.9; // Okay, better hope your compiler gives you a warning
The C++ core guidelines put it best: the {} syntax is simpler, more general, less ambiguous, and safer than the rules for other forms of initialization. The exception is when initializing things like vectors:
std::vector<int> x(10); // vector of 10 elements
std::vector<int> {10}; // Vector of one element with the value 10
There are a few other exceptions; see Rule ES.23 of the C++ core guidelines for more information.
In general however, if your just learning C++, a lot of this probably went over your head. Just use the braced initialization syntax. Don't worry about the why for now; much of it is quite complex and difficult to explain for new learners.
AudioGames.net Forum → Developers room → Learning c++ as a blind user.
Generated in 0.021 seconds (55% PHP - 45% DB) with 11 queries