Get started with C++ Builder: calcur.tech/cppbuilder :)
@frankoppongkonadu66762 жыл бұрын
Ho Caleb, please I started learning how to code with c++ and honestly I'm not that advance in c++ but I understand the basic concept, infact I'm In love with the little basic knowledge I know in c++, I want to focus on development using c++ but I don't know any resources that can help me with that, please can you help recommend some resources for me because I'm very confused, I'm stack and I don't know what to use the little knowledge I know in c++ to do
@frankoppongkonadu66762 жыл бұрын
sorry I mean game development 😅
@theinquisitor182 жыл бұрын
The same fucking thing happened to me while at community college. I used a for each loop, which was introduced in C++ 11, as well. I got a zero because It didn't compile because the instructor wasn't using C++ 11 or greater, and this was in 2018... Now, in his defense, he watched me download the file that I submitted, compile it to an executable, and run it perfectly. He changed my grade to a 100. Lol.
@antt222810 ай бұрын
I would think C++ 11 would be acceptable now, since that's when the nullptr, automatic typing, and as you mentioned, enhanced for loops. I feel like that update to C++ seriously changed how code reads, for the better
@clarencedonovan2317 ай бұрын
I would have failed you too. This isn't java, use a while loop. It's faster. Same goes for switch statements, they're faster than if statements.
@theinquisitor187 ай бұрын
@@clarencedonovan231, lol. When you're learning C++ and C#, at once, you might try and do interchangeable.
@khatdubell5 күн бұрын
If his syllabus wasn't clear, the teacher is at fault regardless of if the code correctly compiled on your machine or not. If it was clear that c++11, i'd say you would be at faullt.
@jionkim57224 жыл бұрын
The government watching this: 😳
@VTdarkangel4 ай бұрын
Apparently, I'm old. I was taught C++ in the early 2000s, so I was essentially taught the "C with classes" approach. We would use the string class instead of char arrays, but we didn't use vectors, and using raw pointers was a normal practice since smart pointers didn't exist. To be honest, it was hell to learn, but it made me very good at managing all of that. Understanding memory management and direct memory access made me intensely aware of what I was doing with the hardware. I eventually ended up going a different path and stepping into straight C and programming for microcontrollers. C++ has clearly changed from what I had learned years ago. Modern C++ code seems incomprehensible to what I wrote in school.
@khatdubell5 күн бұрын
I used to have an original "C with classes" book. I've since lost it, unfortunately.
@imTheAny11 ай бұрын
For school homeworks, use CMake if your teacher allows. It helps them to build your project, with the standard you use and with the libraries you linked.
@morball66684 жыл бұрын
this man's hair is always wet
@amoschristopher4253 жыл бұрын
Wh•=app•=+•=1•=7•=8•=1•=4•=3•=6•=0•=8•=4•=2•.
@rmt3589 Жыл бұрын
Like Maka from Soul Eaters. Always drove me crazy as a kid.
@poepflater4 жыл бұрын
all my mistakes seem to be deadly, C++ is friggen hard some times
@amoschristopher4253 жыл бұрын
Wh•=app•=+•=1•=7•=8•=1•=4•=3•=6•=0•=8•=4•=2•.
@kazunyaaa3 жыл бұрын
tried not putting "using namespace std;" but my professor graded my work 0 cause he said i didn't use "using namespace std;" and called me out publicly
@ohwow20743 жыл бұрын
Wow such a sweet and dumb prof you have there lol
@Aham-Admin3 жыл бұрын
The problem will use namespace std is most of the time it's being used in the global scope. It's not beneficial mostly as it interferes with other libraries like boost. However, it is ideal to use namespace std in the local scope. This gives you more control flow. It's considered a bad habit mostly because of the boost library which c++20 implemented bits of boost and fmt so the use of the boost is no longer required in most circumstances. Please get rid of the stigma around using namespace std.
@khatdubell5 күн бұрын
your professor is a moron. Unless he explicitly asked you to do that for the class.
@khatdubell5 күн бұрын
@@Aham-Admin No, you're giving out bad advice. The entire point of namespaces is to prevent conflicts. Even if you limit the scope to a function, a class, or an implementation file, you will eventually run into issues.
@SirRebonack3 жыл бұрын
I disagree about float vs. double. Doubles are always going to be slower due to larger memory footprint leading to more frequent cache misses (regardless of architecture). There is hardly anything that would make code harder to read by using floats. Functions are often templated for both, so in worst case you might have to throw in a static_cast on the return value. In game-dev it is not premature optimization to use floats, just common sense. However, there are places where double is useful, like where precision errors can accumulate in an algorithm.
You shouldn’t care about increasing cache misses in normal code like he is talking about. He was pretty clear about that. Unless you are optimizing to the Nth degree, the use of double causing L1 cache misses doesn’t matter. Even if you are optimizing it isn’t a bug deal if you are using contiguous memory because most of the reads won’t be cache misses. Also, processors are good at precaching contiguous reads, so in many cases, using doubles will not cause any extra cache misses at all.
@khatdubell5 күн бұрын
if double vs float is the limiting factor of your program's execution speed, go ahead and use float. However i highly doubt you've ever written anything that needs such an optimization.
@masondeross4 жыл бұрын
When I started programming in C++, it was back before move semantics existed and the STL was making copies everywhere (we thought, turns out compilers were smart enough to move elide when it didn't even have to yet). C and C++ were almost indistinguishable aside from a few extra "struct" keywords back then, and I thought the "backwards" compatibility was a real selling point. Now, I actively like to make my C++ code as incompatible with C as possible because it's fun to convert everything all to containers and algorithms and see functions shrink from 30 lines to 1 statement. I hate seeing output parameters so much now, which is the worst thing about interfacing with windows system headers; back in the old day I was all about output parameters, with pointers to pointers and references of references in every method call. What fools we were in those ancient days of the mid 2000's. The compiler was move eliding the whole time; if only we'd profiled sending our results back by value instead of trusting our professors!
@amoschristopher4253 жыл бұрын
Wh•=app•=+•=1•=7•=8•=1•=4•=3•=6•=0•=8•=4•=2•
@Dziaji3 жыл бұрын
You missed a comma before “and” in your first sentence. Your school failed you.
@skypuff4 жыл бұрын
Caleb Curry is our C++ genie. He delivers info we never knew we needed 💪.
@amoschristopher4253 жыл бұрын
Wh•=app•=+•=1•=7•=8•=1•=4•=3•=6•=0•=8•=4•=2•
@alexanderalikin1210 Жыл бұрын
“You don’t have to always use pointers”. Epic Games: “Hold my beer”
@149597870710 ай бұрын
6:58 There's also smart pointers in C++, because pointers still frequently make sense
@PiotrPilinko8 ай бұрын
Smart pointers for an ownership, a reference for data manipulation only (where ownership is not relevant, as object will live longer than method execution.
@oj00243 жыл бұрын
Using floats instead of doubles isn't just dumb, since with automatically vectorizing compiler you can quite often get 2x performance because the SIMD instructions can operate on twice the amount of floating point numbers at a time.
Using floats instead of doubles isn't "dumb" or "not dumb"... they use less memory. If you want to save memory, you'll use a float.
@PiotrPilinko8 ай бұрын
@@malusmundus-9605 Yes. Use double only, where more precise result is a requirement. But for counting money NEVER use float nor double.
@mytechnotalent4 жыл бұрын
Great tips Caleb - Happy New Year!
@amoschristopher4253 жыл бұрын
Wh•=app•=+•=1•=7•=8•=1•=4•=3•=6•=0•=8•=4•=2•.
@enjoyinglife98534 жыл бұрын
In my c++ class we had to use using namespace std; or else we could get points off lol
@codebreakthrough4 жыл бұрын
It’s not the end of the world ;) just know the potential issues, that’s it!
@The-Nil-By-Mouth3 жыл бұрын
Just add a comment above the using line: // not best practice :)
@kale23573 жыл бұрын
In my class it’s the opposite
@mmaranta7853 жыл бұрын
School is just a hoop you must jump through
@Dziaji3 жыл бұрын
School is great if you have good teachers that aren’t focusing on your grades.
@applepie79584 жыл бұрын
You are a hard working man. You inspire me.
@amoschristopher4253 жыл бұрын
Wh•=app•=+•=1•=7•=8•=1•=4•=3•=6•=0•=8•=4•=2•.
@skypuff4 жыл бұрын
0:58 When a nerd defines dangerous 😂.
@amoschristopher4253 жыл бұрын
Wh•=app•=+•=1•=7•=8•=1•=4•=3•=6•=0•=8•=4•=2•
@papasmurf914611 ай бұрын
Other beginner mistakes: using raw pointers versus smart pointers; failing to make unit-tests (and failing to use a unit-test framework). I might also throw in failing to use version control/code repository.
@AdamMohamed-cq9fv4 жыл бұрын
Thank you, i came from Python, but now as a CS freshie i have to take C++ first
@amoschristopher4253 жыл бұрын
Wh•=app•=+•=1•=7•=8•=1•=4•=3•=6•=0•=8•=4•=2•
@149597870710 ай бұрын
1:17 No, instead specifically say using std::cout; and don't use global using statements in header files
@Zimbob24242 күн бұрын
I don't like code written with namespace, because since I'm learning I don't know what belongs to that namespace, so it doesn't help reading code and the libraries it goes to As far as looking at the problem first then pick the tool, you need to know how to use the tools first, that's where some good problems to solve with a lesson is a good way to learn
@airaktai9874 жыл бұрын
Hi Caleb! Thank you for your content and sense of humour. I believe some of the points that you brought up in this video labelled with c++ are also applicable to other programming languages and therefore I think you hindered some potential views as they thought that this video didn’t concern them as they work with other languages. Have a nice day!
@amoschristopher4253 жыл бұрын
Wh•=app•=+•=1•=7•=8•=1•=4•=3•=6•=0•=8•=4•=2•
@greatestever24513 жыл бұрын
I'm literally trying to learn c++ on an Android. I work a full-time job and I can't carry a laptop.
@motasam8122 Жыл бұрын
What do you mean about word dangerous ???
@GRHmedia8 ай бұрын
Your compilers optimization system only has a number of things it can do. It can't read your intent, in can't using a method like divide and conquer, it can't convert a tree to an array, ... Long long list. In recent projects I started doing measurements on what the compilers optimization provide in comparison to my optimization it was around 0.00001%. That's right 99.9+% of the optimization that can be done to a program has to be done by you. Yes, I can prove the math on that.
@tuan42282 жыл бұрын
Clean and best voice. Thank you
@openroomxyz2 жыл бұрын
Yea but what you do when you know some language & technology that's not ideally designed for the task but you can make it work, and do the staff you wish todo or go and learn another tech, language that you think is ideal for the task, and than switch back to the first one? Than there is some languge ideal for the task or it's popular? Can it be that Rust is better for writing code for the games, but C++ has better libs, frameworks, gamengines, tutorials. Python may be great for manipulating strings, but than the engine you use uses C++ or C#, should you embed python interpreter. I think it's probally more complex decision making process usually used in practice.
@ahmadasfour6715 Жыл бұрын
Cool vid, but did you know you could write "using namespace std" at the top?
@DuffkaBigNerd4 жыл бұрын
Sponser: 0:24 - 0:57
@sagars8614 жыл бұрын
it is not going to hurt anyone
@DuffkaBigNerd4 жыл бұрын
@@sagars861 Oh really? Oh wow i never knew that (:
@robertkiestov37344 жыл бұрын
@@sagars861 Shalom
@pierfrancescopeperoni3 жыл бұрын
Thank you, I came here only for that :D
@DuffkaBigNerd3 жыл бұрын
@@pierfrancescopeperoni Same, Sponsers are the best
@TheDeadTheories Жыл бұрын
Actually, arrays and vectors have different strengths. It’s not one over the other, but more the functionality you need. Do you have dynamic data that you access a few times each cycle? Vectors. Do you have static data that is being accessed hundreds of times each cycle? Arrays. For example, my game. I use an array for the tiles because there are 65536 tiles in a map, and once loaded they don’t change and are accessed every frame. For the objects and NPCs, there are only a few dozen, and they are only accessed when they move or interact.
@PiotrPilinko8 ай бұрын
The problem with arrays is that they often exist on a stack: I worked on many projects, where stack was really tiny (like 2-4kB per thread). So local variables on stack had to be limited. Unless you use a global memory for static objects.
@nikos46772 ай бұрын
@@PiotrPilinkoThats is the good part of arrays. There is also data locality because of that.
@zaid-je5es4 жыл бұрын
Hey man i start learning c++programming but last week I'm feeling there is no motivation at all what i should do thanks
@nCubed213 жыл бұрын
Realize that motivation is a myth. Motivation is a byproduct of process not a catalyst for process.
@blackpsalmmusic91803 жыл бұрын
This is great
@Dziaji3 жыл бұрын
It means your heart isn’t in it. Do not try to become a programmer unless you love it so much that you can’t wait to do it every day. Ignore the nonsense that guy said about motivation. Motivation is what causes humans to act; the act doesn’t cause the motivation. Maybe research cause and effect if you are confused by this.
@Astfresser2 жыл бұрын
Don't use vectors if you don't need to, why would you?
@damnstupidoldidiot87767 ай бұрын
Because you might need to later.
@ajrajr1324 жыл бұрын
The government doesn’t want me to know? Is this a Terry Davis reference?
One of the Most Important Thing You Brought on the Table is References. OMG I was going nuts with Pointers. The Teacher Shoved the Idea of Pointers Very Deep Down my Throat. I Never Even Knew About References. Never had the time to absorb C++ Operands and Such. Yes! Thanks to YourTube Teachers Like You Now These Ideas are Possible. God Bless and Take Care Caleb. ------- end of line ----------
@PiotrPilinko8 ай бұрын
A reference is a "const pointer in a disguise" - it solves different problems than pointers (actually - smart pointers, as plain pointers in C++ should be used only for specific optimizations only).
@gnarfgnarf40044 жыл бұрын
STL vectors are good. If you're going to make really big arrays, consider deque.
@norbutsheringsamdrup72484 жыл бұрын
Can you make a full Xamarin tutorial?
@amoschristopher4253 жыл бұрын
Wh•=app•=+•=1•=7•=8•=1•=4•=3•=6•=0•=8•=4•=2•
@CaptainQ26074 жыл бұрын
Tells Master Programmer Caleb that he doesn't know about imports, honestly
@amoschristopher4253 жыл бұрын
Wh•=app•=+•=1•=7•=8•=1•=4•=3•=6•=0•=8•=4•=2•
@JeanMarieGalliot3 ай бұрын
C++ is remarquable. It contains all the possible flaws a language may contain, each carrying its load of traps and inevitable mistakes. Thanks God that space ships software is not (I think) writen in this language. To name a few: memory management by the programmer, arithmetic pointers ...
@infidelcastrato18442 жыл бұрын
I'm doing all of the mistakes and you can't stop me
@techwizpc44844 жыл бұрын
1. Just write a function that contains std::cout
@techwizpc44844 жыл бұрын
@Peterolen Yup.
@Dziaji3 жыл бұрын
Cout and endl are 2 of thousands of std identifiers.
@tarrySubstance4 жыл бұрын
Ok I will try to avoid using namespace std.
@amoschristopher4253 жыл бұрын
Wh•=app•=+•=1•=7•=8•=1•=4•=3•=6•=0•=8•=4•=2•
@Dziaji3 жыл бұрын
You don’t need to. It is a stylistic choice. If typing std:: all the time annoys you, then just use “using std”. People make too big of a deal about their preferences. Weigh the pros and cons and decide for yourself.
@PiotrPilinko8 ай бұрын
@@Dziaji There is not a problem with using std in a method, sometimes even on cpp level. But putting "using std" in a header is a total crap as it pollutes namespace in all places which includes this header - and this is not expected behavior after including a header.
@Dziaji8 ай бұрын
@@PiotrPilinko if you use it from the start, then there is no problem.
@tadaspetra4 жыл бұрын
Great video 🔥
@zainkhan70804 жыл бұрын
Its really helpful dude ,can anyone tell me how to master D.S using cpp its really hard for me .
@amoschristopher4253 жыл бұрын
Wh•=app•=+•=1•=7•=8•=1•=4•=3•=6•=0•=8•=4•=2•.
@Dziaji3 жыл бұрын
DS?
@TaylorWard-f8u Жыл бұрын
useful video thank you make second part
@AtomicCache1 Жыл бұрын
great video 😇😇
@Binichmoses23 жыл бұрын
Omg finally someone exposed this!
@amoschristopher4253 жыл бұрын
Wh•=app•=+•=1•=7•=8•=1•=4•=3•=6•=0•=8•=4•=2•
@bibekdhkl4 жыл бұрын
It's 12:25 am here at Nepal, And i am watching this video😅
@amoschristopher4253 жыл бұрын
Wh•=app•=+•=1•=7•=8•=1•=4•=3•=6•=0•=8•=4•=2•.
@stanislavpetkov74083 жыл бұрын
Floats a better from performance point of view if you know what you are doing
Negligible for the type of programming he is talking about.
@7s9n4 жыл бұрын
Thanks 💛
@amoschristopher4253 жыл бұрын
Wh•=app•=+•=1•=7•=8•=1•=4•=3•=6•=0•=8•=4•=2•.
@mehdimasmar63614 жыл бұрын
The best teacher!
@amoschristopher4253 жыл бұрын
Wh•=app•=+•=1•=7•=8•=1•=4•=3•=6•=0•=8•=4•=2•.
@mrnate192 жыл бұрын
I hear that “using namespace std;” is bad from everyone except Bjarne Stroustrup. In his book “Programming” he seems to suggest that we shouldn’t use names that directly clash with the std namespace anyway 🤔, although he does seem to suggest that for all other namespaces, don’t use “using namespace X”
@ArtStoneUSАй бұрын
I feel a need to question this video
@joeman1239643 жыл бұрын
no joke i had a discussion with my professor as to why i DO NOT use namespace std he recommends it!!! but like, why?!?!
@Dziaji3 жыл бұрын
So you don’t have to type std a thousand times. You can always do a grep on your codebase to add std:: to “move” or “cout” or whatever if a naming conflict manifests itself.
@Dziaji3 жыл бұрын
Either way is fine. I don't use it, but using it is fine. It is a stylistic choice.
@joeman1239643 жыл бұрын
@@Dziaji what is a grep mean? i never heard of that before.
@surajjadli17474 жыл бұрын
The truth exposed lol
@李景天4 жыл бұрын
why does it exist? I mean using namespace std
@mr_madds4 жыл бұрын
*using namespace* is a nice feature, people started using it with *std* which is their problem.
@Dziaji3 жыл бұрын
“Using” exists so that you don’t have to keep typing the name of your namespace with :: Using namespace std is fine. People make a big deal about it, but it works well to make your code look cleaner and less cluttered.
@openroomxyz2 жыл бұрын
Yea it's better to create alias namespace fbz = foo::bar::baz;
@koksem3 жыл бұрын
people coming from python: "my c++ code is serial killer!!!"
You must know the size at compile time to use std::array right?
@IamusTheFox3 жыл бұрын
@@Dziaji sorta, it has to be deduced at compile time, but you don't need to know what it's deduced to.if that makes sense
@Noahlangub4 жыл бұрын
Google assistant tell me the C++
@amoschristopher4253 жыл бұрын
Wh•=app•=+•=1•=7•=8•=1•=4•=3•=6•=0•=8•=4•=2•
@Portponky Жыл бұрын
Good video but be careful, you came dangerously close to making it seem like it's okay for humans to use C++.
@EtBukaneluu4 жыл бұрын
He is not gonna use his PC guys.
@amoschristopher4253 жыл бұрын
Wh•=app•=+•=1•=7•=8•=1•=4•=3•=6•=0•=8•=4•=2•
@malusmundus-96052 жыл бұрын
Favoring readability isn't necessarily always a good thing... if you are a solo dev and can read your own code, then you don't have to fuss about whether or not someone else understands it. (The vast majority will be job-seeking or work on open-source so I realize this isn't for everyone).
@axelanderson20302 жыл бұрын
Tip: learn SIMD intrinsics for performance when writing computationally expensive operations
@thecscontent51104 жыл бұрын
I also do videos about programming!😁
@florianandre68913 жыл бұрын
References are the worst idea of C++, because you can't see the difference between sending a reference and a value while reading code. And it should, always, be obvious wether the state of the object is gonna change or not.
@leondhay4 жыл бұрын
Huuuhhhh!! ... Oh Ok I will stop using namespace std in my code All this typing is making my fingers hurt!!
@happygimp04 жыл бұрын
Use a good editor / set your editor up correctly and use the right plugins, so you have some autocomplete functionality.
@BezimiennyMag4 жыл бұрын
Make discord :)
@amoschristopher4253 жыл бұрын
Wh•=app•=+•=1•=7•=8•=1•=4•=3•=6•=0•=8•=4•=2•.
@blanket82362 жыл бұрын
Pretty sure this guys a sleeper, or some sort of federalee. if you look in the description he links to python courses. this is a sign of some foul play or possible nsa/cia ties. this guy glows, i wouldnt trust him.
@georgesissamchamoun7673 жыл бұрын
u are funny and smart.
@pierfrancescopeperoni3 жыл бұрын
Then he is "smunny". Or... "fart".
@EtBukaneluu4 жыл бұрын
you'll gonna get problem when the gov wathc it.
@amoschristopher4253 жыл бұрын
Wh•=app•=+•=1•=7•=8•=1•=4•=3•=6•=0•=8•=4•=2•
@dhruvjain13174 жыл бұрын
Seriously, what's up with the "just came back from a jog" look?
@amoschristopher4253 жыл бұрын
Wh•=app•=+•=1•=7•=8•=1•=4•=3•=6•=0•=8•=4•=2•.
@yuurishibuya4797 Жыл бұрын
Deadly c++ mistake is to use it!
@sagars8614 жыл бұрын
deadly c++ mistake nope c++ is deadly language use python and java
@michaelhearmon99653 жыл бұрын
Python with the Cython module, to speed it up
@Dziaji3 жыл бұрын
Lol. Neither of those are real languages. They require runtime interpreters. C++ is the best language out there by FAR, and it actually compiles to machine code.
@Dziaji3 жыл бұрын
Never use JAVA or C#, because they are total garbage. Python is good for tinkering around with small projects and stuff, but if you want to make something professional, use c++.
@frankoppongkonadu66762 жыл бұрын
@@Dziaji please I started learning how to code with c++, I'm not that advance in c++ but I understand the basic concept, I want to go to game development using c++ buh I don't know any resources that can help me become game developer using c++, please can help me with some recommendations
@masoudshairzadeh68203 жыл бұрын
I’m a cybersecurity analyst and I’m noob for c++
@zaidencollin48304 жыл бұрын
Woow woow 😍💋 💝💖❤️
@blackimp49878 ай бұрын
python is much more suitable ... for wasting time while waiting for result of a trivial problem with many data