foxpy / qc

Quad C: Custom Cruel C Crate
MIT License
4 stars 0 forks source link

command line arguments help function can't access any data without using global variables #2

Closed foxpy closed 3 years ago

foxpy commented 3 years ago

I guess the best solution is to have help function receiving a pointer to void. User defines his own struct in which he passes data to function. Argument library stores this pointer and passes it to help function. This way user gains a lot of flexibility without introducing any complexity to library.