ARRAY - Making DATA STRUCTURES in C++

The first 1000 people who click the link will get 2 free months of Skillshare Premium: skl.sh/thechernoproject10
Patreon ► / thecherno
Instagram ► / thecherno
Twitter ► / thecherno
Discord ► thecherno.com/discord
Series Playlist ► thecherno.com/cpp
This video was sponsored by Skillshare.

Пікірлер: 238

  • @TheCherno
    @TheCherno3 жыл бұрын

    Thanks for watching! Don't forget that the first 1000 people who click the link will get 2 free months of Skillshare Premium: skl.sh/thechernoproject10

  • @swapnilbhave3767

    @swapnilbhave3767

    3 жыл бұрын

    Watched your all C++ vidoes.. those are awesome.. thanks for this video waiting for STL from long time

  • @skillerraptor8669

    @skillerraptor8669

    3 жыл бұрын

    Damn I cannot take it.

  • @ketanlalcheta4558

    @ketanlalcheta4558

    3 жыл бұрын

    Not able to sign up

  • @amirasyraf3352

    @amirasyraf3352

    3 жыл бұрын

    Just wanna say thank you so much for the Skillshare offer. Can't wait to study more programming and game design! :D

  • @aqezzz

    @aqezzz

    3 жыл бұрын

    Thanks for this, I've been wanting to try it! Got in on it!

  • @ethansuresh2322
    @ethansuresh23223 жыл бұрын

    Suggestion: video on CMAKE, makefiles, etc

  • @kaoti

    @kaoti

    3 жыл бұрын

    YES PLEASE

  • @jscorpio1987

    @jscorpio1987

    3 жыл бұрын

    Somebody asks that on almost every one of those videos and I’m pretty sure the reason he hasn’t done a video on the subject is because Makefiles, etc., aren’t part of the C++ language, and this is a C++ language tutorial. Plus, he uses visual studio, which doesn’t use Makefiles, so it would be pointless.

  • @klauseternal3381

    @klauseternal3381

    3 жыл бұрын

    @@jscorpio1987 you could say it's a null pointer

  • @leocarvalho8051

    @leocarvalho8051

    3 жыл бұрын

    He doesnt even use cmake and makefile is not usefull to him since he uses windows+vstudio only

  • @deathscreton

    @deathscreton

    3 жыл бұрын

    Those are poor excuses for not doing it. Plenty of projects that use C++ make use of cmake or make files. He probably runs into them quite a bit, especially with open source projects.

  • @muhammadaamirzaman
    @muhammadaamirzaman3 жыл бұрын

    Waiting for data structures for a looooong time super excited for this series

  • @wesleythomas6858
    @wesleythomas68583 жыл бұрын

    Love raw breakdowns like this. This quality is what makes your channel unique 👍

  • @darthxertor3617
    @darthxertor36173 жыл бұрын

    Awesome man! Very glad you opted to start delving into data structures and algorithms in your C++ vids! Very much looking forward to more of these! Thanks so much.

  • @1973Washu
    @1973Washu3 жыл бұрын

    Suggestion: linked lists then binary trees. My knowledge of this area is a little patchy and hearing a second expert explanation of a topic is always welcome.

  • @locomotivere4497

    @locomotivere4497

    3 жыл бұрын

    cool

  • @nallid7357

    @nallid7357

    3 жыл бұрын

    I agree with this order, binary trees are in of themselves a linked list. Hopefully he'll explain doubly, single, and circular linked lists sometime soon.

  • @soniablanche5672

    @soniablanche5672

    4 ай бұрын

    ​@@nallid7357 Not all. You can implement binary heap with an array.

  • @woofelator
    @woofelator3 жыл бұрын

    I'm glad you're doing this series lmao. I took a data structures course at my university last year, and now I can keep myself refreshed on the material through these videos so I don't forget all these concepts

  • @nextrie
    @nextrie3 жыл бұрын

    Simply brilliant, Cherno! Keep them coming!

  • @BobStraitFTW
    @BobStraitFTW3 жыл бұрын

    I've wanted to this exact thing for a long time and was never able to fit the pieces together. Thank you. :D

  • @thanostitan.infinity
    @thanostitan.infinity3 жыл бұрын

    I was waiting soo eagerly for this 🙏🏼 your videos have become my bread butter daily these days haha. Thanks so much for sharing all your knowledge cherno!

  • @ajj7794
    @ajj77943 жыл бұрын

    i love you for doing this. 1 BIG recommedation is to move this videos to early parts of the playlist. many thanks. love your work!

  • @rcookie5128
    @rcookie51283 жыл бұрын

    This series is super helpfull! :) Edit: Also, the way Cherno explains the things (dissected and explained step by step, from basic functionality too the more complex results) is so much better then most written documentation you can find..

  • @ParkerPlaysPC
    @ParkerPlaysPC3 жыл бұрын

    Love this data structure focused video in the C++ series. Please keep the coming!

  • @griimick
    @griimick3 жыл бұрын

    Thanks for this series. The stack and heap allocation just made me smile.

  • @fmt2586
    @fmt25863 жыл бұрын

    Thank you So Much , you are the best channel i've seen ... you are beyond professional. You are my inspiration in learning c++ and, i hope you keep making videos, love you Cherno.

  • @practicalsoftwaremarcus
    @practicalsoftwaremarcus3 жыл бұрын

    Thank you so much ! Looking forward for the iteraror implementation. Also, I'd like to see you talk about boost library, more specifically boost::bind methods (also also, I believe they have been integrated into STD by now)

  • @ShivamJha00
    @ShivamJha003 жыл бұрын

    Definitely need video on implementing iterator please

  • @jamesmnguyen

    @jamesmnguyen

    3 жыл бұрын

    A really super simple forward iterator is literally just a pointer. So part of your goal is already done.

  • @oracleoftroy

    @oracleoftroy

    3 жыл бұрын

    @@jamesmnguyen Yeah, but that only works for two data structures, vector and array, and the latter works because arrays decay into pointers. Implementing iterators for anything else is more complicated.

  • @maksymiliank5135

    @maksymiliank5135

    3 жыл бұрын

    @@oracleoftroy Iterators for linked lists are also pretty easy. It gets harder for trees though, because you need to figure out the logic to access every element in the right order. Especially if it is a search tree, where the order is important

  • @nashaut7635

    @nashaut7635

    3 жыл бұрын

    @@maksymiliank5135 ... which is indeed one good reason to look forward for a tutorial from The Cherno. That promises to be quite exciting.

  • @hafsahmr9010
    @hafsahmr90103 жыл бұрын

    Waited for this for so long! Looking forward.

  • @mohammednihad6755
    @mohammednihad67553 жыл бұрын

    I'm really gonna LOVE this! I was always trying to implement different STL classes that I use and love myself. And also to expand and add upon them. My favourite ones were String and List(dynamic array). Thanks a lot for your great content Yan 💙💙

  • @lionkor98

    @lionkor98

    3 жыл бұрын

    std::list is not a dynamic array ;)

  • @nastarankouhdareh8354
    @nastarankouhdareh83543 жыл бұрын

    Thank you Cherno! was helpful as always.

  • @tonychristney2728
    @tonychristney27283 жыл бұрын

    That "noise" at the top is very useful. It allows you to write things like using container = std::array; container x; memset(x.data(), 0, x.size() * sizeof(container::value_type)); Then when you need to change int to uint64_t or uint8_t, you only need to change it in one place. Putting sizeof(int) in that memset is buffer overflow waiting to happen.

  • @DanishRaza-ji2du
    @DanishRaza-ji2du3 жыл бұрын

    Loved your videos. Learning so much.

  • @vojinmilovic2802
    @vojinmilovic28023 жыл бұрын

    This was so helpful! Thanks

  • @badwolf8112
    @badwolf81123 жыл бұрын

    glad you're making data structs & algos series. would also be good to mention using arrays unless you need optimization is bad practice, and more generally optimizing before you need to. and it would be nice if you go into some of the nitty gritty details about why there's an overhead from not keeping your data contiguous; it's not self evident, and especially mysterious if you know your programs use virtual memory.

  • @ianpan0102
    @ianpan01023 жыл бұрын

    Definitely gave me more insight regarding OOP and templates!

  • @sasoyu8922
    @sasoyu89223 жыл бұрын

    Awesome! Can't wait to see the next DS 😍

  • @anupkodlekere8604
    @anupkodlekere86043 жыл бұрын

    Would love it if you would do more of these!

  • @osman9750
    @osman97503 жыл бұрын

    Love this style where the video zooms in on the code and it is easier to see.👍

  • @CosmJJ
    @CosmJJ3 жыл бұрын

    Thanks, Cherno! Your channel is a real treasure)

  • @soniamh8839
    @soniamh88393 жыл бұрын

    My very favourite topic in C++ : data structures. Thank you so looking forward to it.

  • @shashikantpawar7069
    @shashikantpawar70693 жыл бұрын

    Thank you so much 🙂. What a great series of c++..

  • @yijirong6518
    @yijirong65182 жыл бұрын

    best cover of data structure. Thanks for sharing

  • @petrkassadinovich2705
    @petrkassadinovich27053 жыл бұрын

    I found this very useful, thank you!

  • @pawekikta3909
    @pawekikta39093 жыл бұрын

    Thank you Cherno. Admire your work.

  • @kavishshah6441
    @kavishshah64413 жыл бұрын

    Yes more of this please

  • @floatingpointerror55
    @floatingpointerror553 жыл бұрын

    Great refresher!!!♡☆

  • @matthewcorbett8637
    @matthewcorbett86373 жыл бұрын

    Great Video! I just made a dynamic array and a doubly linked list last semester. It is so much harder than it oringinally sounded. Would love to see how to create a (un)ordered (multi)map or a priority tree of some sort! Thanks again! :)

  • @Thebreak1
    @Thebreak13 жыл бұрын

    Nice video as always ^^ I'd like to see some implementation of Dictionaries and maybe showing that with hash functions. I only understand that they are probably used for that, but I wonder how you actually use them effective. Wondering how much space to allocate and still use hashes.

  • @buchnejf
    @buchnejf3 жыл бұрын

    Great Great Great! video. What a great video to watch while drinking my morning coffee ;)

  • @evilcorp.7288
    @evilcorp.72883 жыл бұрын

    The content....Love it 🔥

  • @zubaeralam9202
    @zubaeralam92023 жыл бұрын

    I am an undergraduate student. I already love your content and find it really inspiring. But can you please do more content related to basics and Data Structures?

  • @Zerefse
    @Zerefse9 ай бұрын

    thanks for the explanation😊

  • @PrinceGupta-jo8lo
    @PrinceGupta-jo8lo3 жыл бұрын

    Suggestion: templated version of segment tree. I know it's not that important but if you find time, it'll be pretty interesting to do.

  • @patrickmetznermorais2868
    @patrickmetznermorais28683 жыл бұрын

    Great videos!!! Could you make a video about UNIT TESTs in C++?

  • @ProttoUFSC

    @ProttoUFSC

    3 жыл бұрын

    up

  • @AvocadoHappiness

    @AvocadoHappiness

    3 жыл бұрын

    Yes please!

  • @xvoidee
    @xvoidee3 жыл бұрын

    Live demos are cool! Hopefully I will see you on some gamedev/cpp conference as a speaker.

  • @sukhrajrandhawa5195
    @sukhrajrandhawa51953 жыл бұрын

    Would love to see videos implementing data structures of other STL containers like vectors and strings with things such as iterators within them in the future. Anyway, great video :)

  • @carsonholloway
    @carsonholloway3 жыл бұрын

    FINALLY!! I've been waiting for a DATA STRUCTURES series for what feels like ages. Much appreciated!!

  • @jgurtz
    @jgurtz3 жыл бұрын

    Nice, would be lovely to see you cover tree-based data structures. probably after linked lists.

  • @dhruvpatel3323
    @dhruvpatel33233 жыл бұрын

    Cherno this C++ series is legendary

  • @patrickes4540
    @patrickes45403 жыл бұрын

    Very good content as always. In one of the first videos (video 2 of C++ Series) I downloaded your vs settings. They seems to have changed. Do you update the link or give a one with your updated settings?

  • @rohitrajak5128
    @rohitrajak51283 жыл бұрын

    AVL trees intrigue me and I'd love to see them in a future video

  • @dekrain
    @dekrain3 жыл бұрын

    A few remarks The STL array has its underlying array field public to allow for aggregate initialization, like you can do with a plain array. All the type members like pointer, const_iterator, etc. are actually required by the standard, not just in MSVC implementation

  • @aleksandrzhilkin826
    @aleksandrzhilkin8263 жыл бұрын

    Honestly, I did not touch c++ since 3rd year at uni. This video made ne remember a lot about c++ and tought me more about it than 2 hours at uni ever did) Def subscribed coaus of that. Even though I don't use c++ at work)

  • @smileynetsmileynet7922
    @smileynetsmileynet79223 жыл бұрын

    I'd love to see a simple compiler series using flex and bison to generate a abstract syntax tree that is class based. Then see it in action. An AST that can be reused in other languages you work on.

  • @SOLZandSAGE
    @SOLZandSAGE3 жыл бұрын

    Could you do a video on ideas for projects beginners/intermediate C++ programmers could do to add on to their resume? Currently going into my 3rd year in college, and I'm looking to apply for internships for next summer, but I don't really have any projects to put on my resume nor do I know where to start.

  • @Terracraft321

    @Terracraft321

    3 жыл бұрын

    How is it going

  • @hongquangvu3091
    @hongquangvu30913 жыл бұрын

    That is exactly what i want to learn.

  • @chippandenga6722
    @chippandenga67223 жыл бұрын

    You are running through the material so fast, you cannot be teaching. You are not teaching what you are talking about but running through the material demonstrating how well you know it. But, for someone trying to learn, it all flies over my head.

  • @noahrosser7006
    @noahrosser70063 жыл бұрын

    Thank you

  • @swapnilbhave3767
    @swapnilbhave37673 жыл бұрын

    Waiting for this

  • @ChlorieHCl
    @ChlorieHCl3 жыл бұрын

    While arrays may be easy to deal with, I would certainly like to see you implement some much more complex types like tuple. XD Also, those size_type things are required by the standard, so that template meta-programming on std containers is easier. std::array are implemented as a struct containing a public member of the array, which makes the struct an aggregate, that enables the aggregate initialization syntax (like std::array array{ 0,1,2,3,4 };) without requiring any constructor to be implemented manually.

  • @sebastiangudino9377

    @sebastiangudino9377

    Жыл бұрын

    How is a tuple complex?

  • @ChlorieHCl

    @ChlorieHCl

    Жыл бұрын

    @@sebastiangudino9377 Try implement a tuple type yourself and you'll see.

  • @benoitrousseau4137
    @benoitrousseau41373 жыл бұрын

    Careful with alloca(), it is non-standard (even in C) I think it's only standardized by POSIX, which makes sense because Microsoft's version easily breaks in try/catch blocks. alloca() does have its uses, but if you can get away with a stack array or a SmallVector, you probably want to use that instead.

  • @bulentgercek
    @bulentgercek3 жыл бұрын

    I dislike all those who hit the dislike button. Thanks for that beautiful lesson Cherno!

  • @harishkantsoni9977
    @harishkantsoni99773 жыл бұрын

    thanks for the video

  • @refikalpertuncer8512
    @refikalpertuncer85123 жыл бұрын

    dude you are a god

  • @AnalogDude_
    @AnalogDude_3 жыл бұрын

    nice & usefull video

  • @xavierreigneau41
    @xavierreigneau412 жыл бұрын

    In case you need it, here is the source code of the array data structure: #include #include template class Array{ public: constexpr size_t Size() const { return S; } T& operator[](size_t index){ return m_Data[index]; } const T& operator[](size_t index) const{ return m_Data[index]; } T* Data(){ return m_Data; } const T* Data() const { return m_Data; } private: T m_Data[S]; }; int main(){ Array data; data[0] = "Cherno"; data[1] = "C++"; data[2] = "We"; data[3] = "Love"; data[4] = "Programming!"; for(size_t i = 0; i

  • @init_yeah
    @init_yeah3 жыл бұрын

    Thanks again

  • @legolas5684
    @legolas56843 жыл бұрын

    More videos like this pls pls!!!!!!!!!

  • @stepanhrbek8151
    @stepanhrbek81513 жыл бұрын

    Great video! Suggestion: I would really like to know what constexpr and noexcept are...

  • @thatGuyFean
    @thatGuyFean3 жыл бұрын

    you know , I had sworn that I will never understand loops but after watching your video on the topic , I am on the safe side now, I guess, Thanks man....

  • @JakobRobert00
    @JakobRobert003 жыл бұрын

    Thank you for this tutorial, it was really helpful :) I have two questions about templates: 1. If the template implementation has to be in the header file, is it even possible to distribute closed-source template libaries with pre-compiled binaries? 2. If a template class is just copy-pasted by the compiler for the different template arguments, isn't this a huge waste of memory? So you save some data memory by not having to store the size of the array in a variable, but isn't this cancelled out by the fact that the whole class is copy-pasted which takes up more code memory?

  • @MsJavaWolf

    @MsJavaWolf

    3 жыл бұрын

    1. The template definitions actually don't have to be in the header file, they just have to be in the compilation unit that uses them. You can still split it into .h and .cpp files, but in that case you have to include both the .h and the .cpp in every file that uses them. I agree that the header only variant is much cleaner though, afaik there is no way to make it closed source. 2. Yes, it also makes your executable bigger and can make your compilation times longer. However I find that, unless we are talking about embedded systems, it's not a big deal. Sometimes there is no better way to do it in c++ or any language close to the hardware imo and also keep in mind that if you use the template with the same arguments multiple times it won't get copied many times, it only gets copied when you change the template argument.

  • @ThisRandomUsername
    @ThisRandomUsername3 жыл бұрын

    Suggestion: I know this isn't a data structure, but somewhat related. Could you talk about endianness and how to deal with it? I suppose this is more to do with data punning than anything, but as a firmware engineer working in c, it would be nice to know how one deals with it in c++.

  • @basitsaeed9705
    @basitsaeed97053 жыл бұрын

    WE WANT MORE DATA STRUCT VIDEOS les goo

  • @TheApsiiik
    @TheApsiiik3 жыл бұрын

    What if I want put my array in function method? I don't want care about size. I want use Size()! Again, I have to use template? tamplate function doSomthing(Array arr){ ... }? So if i have hundred or thousand of diffrent arrays I have to alwase make copy of function who will do stuf? Did I miss understand it? Should I create second function to handle size ? To avoid make copy of huge block of code? Grrr... More I am thinking about it, more it become complicated.

  • @Girugi
    @Girugi3 жыл бұрын

    The alloca has a larger issue there. Unrelated to performance. The problem is that it will be freed after the constructor retutn/exit the scope of the function. Meaning you can not use it like that. Only way to get around that is to make the allocation in the scope where the object is created. If you do it like you did it might compile and work in some cases. But in reality you are using stack memory that the program sees as free and might be occupied by other stuff. So it's an undefined behavior. Alloca is awesome, but dangerous if used wrong like that. Should make eha clear.

  • @Xxp0r
    @Xxp0r3 жыл бұрын

    Exception handling, and whether or not to use them please :)

  • @Beatsbasteln
    @Beatsbasteln3 жыл бұрын

    hey man. i have a question about skillshare. i'd like to know a bit what kinda stuff is on there without registrating becuase i don't wanna waste the 2 free months because i currently don't have a lot of time yet. so can you quickly go there and browse for dsp courses for me to inform me if there's some stuff about dsp programming? or things like filter design for audio filters

  • @jacobbell3745
    @jacobbell37452 жыл бұрын

    Is there a way to initialise the array class with a brace-enclosed list like you can with std::array For clarification here's an example: std::array test = { 5, 8, 6 ,8, 3}; But with my own class, I would have to initialise the array, then manually add each value, which is too inefficient.

  • @ShivamJha00
    @ShivamJha003 жыл бұрын

    Wow continue doing data structure please

  • @pygmee6412
    @pygmee64123 жыл бұрын

    In a case where a class constructor takes a pointer of data in parameter and stores it in a class member, I can't quite find a good way to deal with the nature of the pointer. Is there a way to tell if it was stack allocated or heap allocated? The main use case is for a class interface for users who don't exactly know how the class is implemented. If the data is stack allocated and passed to an instanced of the class which is heap allocated, the class should copy the data and delete it in its destructor. But if the data is already heap allocated copying it is a waste of performance and memory. Is there a prefered way for this kind of situation? I am missing an abvious poin?

  • @_destinator_

    @_destinator_

    3 жыл бұрын

    You should copy the object regardless of whether it is stack- or heap-allocated. Even if the data is allocated on the heap, your class is now dependend on data that it does not own. Someone else will eventually have to delete that data and you might be left with an invalid pointer. However, this could also be solved with an std::shared_ptr. The shared pointer would guarantee that the data can not be deleted while your class is still using it. The shared pointer only allows for heap-allocated objects though, so you option 1 might be your only option.

  • @aquavitale3551
    @aquavitale35513 жыл бұрын

    Looking forward to Cherno making his own mini-stl

  • @donrumata5299

    @donrumata5299

    3 жыл бұрын

    the::cherno::libs::standard::stl

  • @nobody2937
    @nobody29372 жыл бұрын

    Cherno, can you please make a video to explain the difference between constexpr and const ? Thank you ...

  • @jawman311
    @jawman3113 жыл бұрын

    Is there a reason the Data() function returns a pointer rather than an address like the operator[] function? I saw your references video and know they are very similar, but not sure if it matters in this case. Thanks for these awesome videos by the way!

  • @davidmiller3867
    @davidmiller38673 жыл бұрын

    Great!!!

  • @MdSheraj
    @MdSheraj3 жыл бұрын

    Please cover unit tests and tuples implementation.

  • @Yupppi
    @Yupppi6 ай бұрын

    I dig arrays but it feels like whenever I'm writing a program (mind you I'm not a programmer by education or profession, I just have had some classes in my degree), it's a case where you ask the user the size of the container (or the data set to be more accurate) if you're not reading it from a file. And c++ doesn't let me get that size, then create an array with that size and use it, it demands a const size that apparently needs to be set at compiling. Although at some point I somehow managed to make it compile with the user input variable size for array size, I have no idea why. It got very upset some days later and redlined it hard. Somehow I had managed to make some sort of loophole around it. Maybe it treated it as heap allocated somehow. It would be really nice to get those turned into stack allocated arrays though, because every function used all the data in the container. Maybe if there was a good idea of the limits of the data set, but I find that the programs I've written to help with some stuff should allow quite big sets, even though I might use it for small sets especially in testing. In general, I find that most if not all of my programs revolve around asking user input and then calculating something. Programming would be so nice if it was done without user inputs. Especially Rust would be nice to use without.

  • @zoriiginalx7544
    @zoriiginalx75443 жыл бұрын

    Awesome! Would love to see more data structure videos :)

  • @user-if1ey5sm1v
    @user-if1ey5sm1v3 жыл бұрын

    Hey just wondering if I can get your visual studio config in terms of colors? Hope you understand what I mean

  • @stepanhrbek8151
    @stepanhrbek81513 жыл бұрын

    And just a question, how do I write a constructor for the Array class, so I can do something like this: Array test_arr = {2, 4, 6}; ?

  • @stepanhrbek8151

    @stepanhrbek8151

    3 жыл бұрын

    @Artem Katerynych Yeah, thanks, now I know.

  • @nrgamepoint3132
    @nrgamepoint31323 жыл бұрын

    hi bro can u start the data structures and mainly algorithm series if u have time.im eagerly looking for that series. or can u point where i can learn those concepts really good.

  • @vexedev
    @vexedev3 жыл бұрын

    The problem I had with these types of structures is that it becomes annoying to pass the arrays around in functions. since Array is a completely different type than Array unless there's some magical c++ way to do it...

  • @zhupdhk
    @zhupdhk3 жыл бұрын

    Does anyone know which theme he uses for Visual Studio?

  • @yavuzselimcagan5233
    @yavuzselimcagan5233 Жыл бұрын

    Awesome

  • @roeiohayon4501
    @roeiohayon45013 жыл бұрын

    A question, if I were to have many arrays of different sizes, will the class be generated for every one of them? will it slow compilation time significantly?

  • @ulriksndergaard5271

    @ulriksndergaard5271

    3 жыл бұрын

    yes and yes :-)

  • @sun4502
    @sun45023 жыл бұрын

    Can't you use const for the size issue ? You said template is the only solution for that issue.

  • @jorgejarai
    @jorgejarai3 жыл бұрын

    The TAs at my Data Structures class allocate *everything* in the heap, even objects which already allocate to the heap by themselves. And they don't even care about releasing the used memory before ending the program. The program may compile and run one way or the other, but I think that's a very bad habit (and bad habits die hard). At least they could tell us we shouldn't do that in production environments or something like that.

  • @lionkor98

    @lionkor98

    3 жыл бұрын

    Those people usually come from Java where you "new" everything and never delete

  • @FreeDomSy-nk9ue
    @FreeDomSy-nk9ue3 жыл бұрын

    Would you make a video about constexpr and noexcept

  • @mohammednihad6755
    @mohammednihad67553 жыл бұрын

    We can technically define: const int size = 7; And before using it to define an array, we can change its value via a pointer like this: int c = 5; const int a(c); cin >> (*(&c + 1)); int array[a] ////////// Now I know that array size must be declared at compile time but this just works... I wonder what strange behaviours will be caused by this hmmmmm...

  • @_Omni
    @_Omni3 жыл бұрын

    _malloca should be used, it is a version of alloca with security enhancements.

  • @luiskao8438
    @luiskao84383 жыл бұрын

    14:44 Why empty() always returns false in MSVC STL?

  • @expurple

    @expurple

    3 жыл бұрын

    I'm getting "true" from empty() on std::array with MSVC. So there's probably a different version of that function somewhere in the code, or something like that.