ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Ok, I wrote a simple program in under UNIX and Linux with a call to getopt() ...in that program, for UNIX I didn't have to include any .h header files...under Linux I had to include unistd.h ... now in Visual C++ , the compiler doesn't recognize getopt.h or unistd.h...I've been googling for an hour now...could anyone please help...I'm just trying to read a commmad line option of "-x" using getopt...yes, I tryed to search the MSDN documentation and the microsoft site...no luck..please help
Using a standard, well-understood API call like "getopt()" instead of rolling your own ad-hoc design each and every time you write a new program would be the hallmark of a sane, professional, conscientious developer.
So of course there's no way to do any such thing under Visual Studio ;-)
To the best of my knowledge, VC++ doesn't have any built-in "getopt()".
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.