Where is getopt

Does anyone know where to find getopt?
getopt is in the header <unistd>, or if you want to use getopt_long its in the header <getopt.h>

https://www.gnu.org/software/libc/manual/html_node/Example-of-Getopt.html
that is a link to a small tutorial on how to use getopt, if you need one
In the non-standard <unistd.h> C header. Not every compiler has it, Visual Studio doesn't.

http://www.cplusplus.com/forum/general/141573/#msg747578
At the moment, I am using Visual Studio (only because Netbeans 12.4 seems to be having difficulty with C/C++). So, <unistd.h> is not available nor is <getop.h>.
if you google it, there are some workarounds ready to download.
https://www.codeproject.com/Articles/1940/XGetopt-A-Unix-compatible-getopt-for-MFC-and-Win32
this is a bit simpler than the original getopt, but depending on how you work with it, it might be enough.
Topic archived. No new replies allowed.