LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Thread Tools
Old 07-14-2005, 10:44 PM   #1
KissDaFeetOfSean
LQ Newbie
 
Registered: Jun 2005
Posts: 27
Thanked: 0
getopt() function in visual C++


[Log in to get rid of this advertisement]
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
KissDaFeetOfSean is offline     Reply With Quote
Old 07-15-2005, 12:47 AM   #2
paulsm4
Senior Member
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 3,318
Thanked: 144
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()".
paulsm4 is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stupid Question: Microsoft Visual Studio 6.0 (A.K.A. Visual Basic 6) Will it run? S0RD3N Linux - Software 8 05-07-2008 09:42 PM
gcc equivalent for Visual C++ function: PeekNamedPipe () m3rc_2004 Programming 1 07-29-2005 06:58 AM
getopt in unix hari_s_82 Linux - Newbie 2 10-01-2004 05:19 AM
getopt(3) Berhanie Programming 8 06-15-2004 10:50 PM
Using getopt in cplus UltimaGuy Programming 3 08-28-2003 06:35 AM


All times are GMT -5. The time now is 05:51 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration