Skip navigation
Dynamic Arrays in C
0:00 / 2:14

Dynamic Arrays in C

Тsфdiиg

@tsoding122K followers

Visit on X
3,818 likesDownloadOriginal post

646,846 views

Dynamic Arrays in C

7 Comments

Comments from the original post on X (Twitter)

  • Тsфdiиg's profile picture

    @tsoding

    The presented in the video code is not meant to be production ready. It's meant to convey the main idea of the approach. You actually want to pass xs by pointer and wrap it internally in parenthesis. I've put a better version in a gist:

    212 likes

  • Тsфdiиg's profile picture

    @tsoding

    Just 9 lines of code?

    121 likes

  • Kolt's profile picture

    @KoltPenny

    I believe this is how vectors work in C++?

    39 likes

  • Тsфdiиg's profile picture

    @tsoding

    Yes

    58 likes

  • Vjekoslav Krajačić's profile picture

    @vkrajacic

    But creating a new struct for each type! Surely, that makes you an unproductive programmer! /s

    23 likes

  • LLLL Colonq (man of letters)'s profile picture

    @LCOLONQ

    this is a nice video format, it's fast but the order of things flows very well

    13 likes

  • Qianqian Fang /房骞骞/'s profile picture

    @FangQ

    in the macro, what does "do{}while(0)" provide compared to just a pair of curly brackets {...}?

    10 likes