LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 07-14-2005, 09:44 PM   #1
KissDaFeetOfSean
LQ Newbie
 
Registered: Jun 2005
Posts: 27

Rep: Reputation: 15
getopt() function in visual C++


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
 
Old 07-14-2005, 11:47 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
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()".
 
  


Reply



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 08:42 PM
gcc equivalent for Visual C++ function: PeekNamedPipe () m3rc_2004 Programming 1 07-29-2005 05:58 AM
getopt in unix hari_s_82 Linux - Newbie 2 10-01-2004 04:19 AM
getopt(3) Berhanie Programming 8 06-15-2004 09:50 PM
Using getopt in cplus UltimaGuy Programming 3 08-28-2003 05:35 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:45 AM.

Main Menu
Advertisement
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
Twitter: @linuxquestions
Open Source Consulting | Domain Registration