LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   the first : (https://www.linuxquestions.org/questions/linux-newbie-8/the-first-726337/)

bencharluo 05-15-2009 10:59 PM

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!

TB0ne 05-16-2009 11:32 AM

Quote:

Originally Posted by bencharluo (Post 3542480)
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?

bencharluo 05-16-2009 07:20 PM

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...

bencharluo 05-17-2009 04:34 AM

up anyone know the answer?

arizonagroovejet 05-17-2009 05:44 AM

Quote:

Originally Posted by bencharluo (Post 3543460)
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/

michaelk 05-17-2009 06:41 AM

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 ( ':' ).

TB0ne 05-17-2009 09:46 AM

Quote:

Originally Posted by bencharluo (Post 3543460)
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....


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