Zig Master: Let's Create a Stack!

Описание к видео Zig Master: Let's Create a Stack!

Help me create more content like this!
https://www.paypal.com/donate/?hosted...

With all the knowledge we've acquired so far, we can build our very own data structure in Zig. In this episode, we'll build a stack that can handle growth via heap allocation and as a bonus we even make it generic. NOTE: I had a little off-by-one bug in the code shown in the video where I compared the slice length plus one as greater than or equal to, when it should be just greater than (in the push method). I made the fix and the code in the repo is now correct.

The code: https://codeberg.org/dude_the_builder...

Relevant Links:
- https://ziglang.org/documentation/mas...

Thumbnail artwork courtesy of: https://www.deviantart.com/krit26/gal...

Комментарии

Информация по комментариям в разработке