Hi, I need to use getopt for a program called like myprogram.c file1 file2 file3 -t. Now I've read some examples about how to use switch cases for options with hypens (-t). But I don't get how to write this for my file1, file2, and file3 (they are arguments that must be provided). It would help if someone could explain getopt in simple terms as well, I feel like my brain is fried at this point with all the variables I read about it having. Thank you kindly!
All 2 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.