MTREE_CHILD(3)

πŸ’– MTREE_CHILD(3) πŸ’–

okay so bestie, welcome to the Librecast Programmer's Manual β€” this is the page for mtree_child, and it's genuinely such a cute little function. no cap. πŸŽ€


🌸 NAME 🌸

mtree_child β€” return node number of first child node


πŸ“š LIBRARY πŸ“š

Librecast library (liblibrecast, -llibrecast)

like, that's the lib you're linking against, periodt. 🫢


✨ SYNOPSIS ✨

#include <librecast/mtree.h>

size_t mtree_child(mtree_t *tree, size_t node);

Compile and link with -llibrecast.

not me reminding you about the -llibrecast flag again... but fr fr, if you forget it nothing links and you'll be sad. 😭

πŸ¦‹ DESCRIPTION πŸ¦‹

The mtree_nnode function returns the node number of the first child of node in tree.

Nodes are numbered from 0 = root.

so basically: hand it a tree and a node, and it hands you back the number of that node's very first child. main character energy, minimal drama, we love to see it. πŸ‘‘


πŸŽ€ RETURN VALUE πŸŽ€

mtree_child() returns the number of the first child node, or 0 if none.

lowkey important: 0 here means "no child", and it's also the root's number, iykyk. πŸ‘€

πŸ’€ ERRORS πŸ’€

None.

literally none. no errors, no drama, she just vibes. 🌈


πŸ‘€ SEE ALSO πŸ‘€


LIBRECAST β€” the Librecast crew, version stamped 2023-07-23. that's the whole page, bestie, you ate it up. go forth and traverse your trees πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from