LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-15-2009, 11:59 PM   #1
bencharluo
LQ Newbie
 
Registered: May 2009
Location: Hangzhou China
Distribution: Ubuntu
Posts: 17

Rep: Reputation: 1
Question the first :


hello,everyone.I want to ask a question.
getopt(argc,argv,":if:lr").
I have seen the samle.But mainly the second :
I want to ask the first : meaning what?
Thank you very much!
 
Old 05-16-2009, 12:32 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,343

Rep: Reputation: 3909Reputation: 3909Reputation: 3909Reputation: 3909Reputation: 3909Reputation: 3909Reputation: 3909Reputation: 3909Reputation: 3909Reputation: 3909Reputation: 3909
Quote:
Originally Posted by bencharluo View Post
hello,everyone.I want to ask a question.
getopt(argc,argv,":if:lr").
I have seen the samle.But mainly the second :
I want to ask the first : meaning what?
Thank you very much!
Yes..meaning WHAT? Can't really understand your question...

What version/distro of Linux? What programming language are you using in this instance?
 
Old 05-16-2009, 08:20 PM   #3
bencharluo
LQ Newbie
 
Registered: May 2009
Location: Hangzhou China
Distribution: Ubuntu
Posts: 17

Original Poster
Rep: Reputation: 1
c programming language...
the ":" in the function getopt(argc,argv,":if:lr");
I have know the second ":" in the function getopt
but I don't know the first ":" in the function.
Thank you very much...
 
Old 05-17-2009, 05:34 AM   #4
bencharluo
LQ Newbie
 
Registered: May 2009
Location: Hangzhou China
Distribution: Ubuntu
Posts: 17

Original Poster
Rep: Reputation: 1
up anyone know the answer?
 
Old 05-17-2009, 06:44 AM   #5
arizonagroovejet
Senior Member
 
Registered: Jun 2005
Location: England
Distribution: openSUSE, Fedora, CentOS
Posts: 1,088

Rep: Reputation: 196Reputation: 196
Quote:
Originally Posted by bencharluo View Post
up anyone know the answer?
I'm not sure anyone understands the question.

You've posted in Linux > Newbie but you question is not about Linux, it is as you say, about the C programming language. You might be using Linux but you could be using any operating system and you would still be asking a question about C, not about the operating system you are using.
There's a programming section at http://www.linuxquestions.org/questions/programming-9/
Or maybe you'd get help at somewhere like
http://forums.devshed.com/c-programming-42/
http://cboard.cprogramming.com/
 
Old 05-17-2009, 07:41 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 15,266

Rep: Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624
I think the OP is asking what does the first ":" mean in the argument optstring ":if:lr".

http://opengroup.org/onlinepubs/0096...ns/getopt.html

Quote:
A colon ( ':' ) shall be returned if getopt() detects a missing argument and the first character of optstring was a colon ( ':' ).
 
Old 05-17-2009, 10:46 AM   #7
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,343

Rep: Reputation: 3909Reputation: 3909Reputation: 3909Reputation: 3909Reputation: 3909Reputation: 3909Reputation: 3909Reputation: 3909Reputation: 3909Reputation: 3909Reputation: 3909
Quote:
Originally Posted by bencharluo View Post
up anyone know the answer?
It's very rude to bump your thread, especially less than 24 hours apart, bugging people to give you an answer.

If it's that urgent, check Google....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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




All times are GMT -5. The time now is 04:52 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration