C Programming on the Mac L41 - Command-Line Arguments

preview_player
Показать описание
How to use command-line arguments in your C program and in Terminal.
Рекомендации по теме
Комментарии
Автор

i had no idea what my pro talking about in class. Now simple and clear.

TheMikeTracing
Автор

5 years ago, but it's still useful. Thank you!!

alberto
Автор

In Xcode, right click on the executable and then select Show in Finder.

AppleProgramming
Автор

Great video!
So now I know how to execute a program in Terminal.
How do I use it as a command-line tool? ex. cd, dir, chmod.
Do I just put it in /bin ?
Is there some kind of list to modify to notify bash that it's a command?

evillizard
Автор

the way you say "forty-one" it sounds like you're a Dave Matthews Band fan.

great tuts, thanks.

whereswayne
Автор

@MrSmaq7777 To be honest I have never tried C# in Mac OS. I think your only options are either to use Windows, which may be better anyways. Or use Mono - just google Mono for Mac.

AppleProgramming
Автор

can you tell me how you download the C# version on mac because it is been so long for me to find that one.... If you can post a link for it I would really appreciate that so much ...Thanks for the video

saleh.alqahtani
Автор

What’s the name of the “%s” thing? Is there a list of all of them?

TheBardsCorner
Автор

Hello, Thanks for the video! just wanted to ask  a question. everything works really well until I change my program, then the command line on terminal still runs my old code not the updated one, Do you know how i can fix this?
Thanks in advance

pinolikescheeseidont
Автор

Thank you so much.. keep up the good work.. you are the man.. !!

TheBinary
Автор

Hi everybody!

Just want to add to a great tutorial an one thing:

You can run you program by Terminal (console app) within Xcode by clicking "Product"->Scheme->Edit scheme or just click Cmd+<. Then click Run->Options and scroll to the bottom and change radio button "Use Xcode" to "Use Terminal". Then you can run your program by Terminal.

muaddibmw
Автор

awesome tutorial.I only have one question, how would you make argv accept a file. I tried putting the file name dot extension and the file name only but it keeps accepting it as a string instead of a file. Could you tell me how to force it to accept the parameter as a file. Thanks in advance

chevanogordon
Автор

I believe if you move it to /usr/local/bin it should work correctly, but I'm not 100% sure.

AppleProgramming
Автор

If the output of the last Terminal command shifts the prompt, I instinctively hit Return without typing anything generate a new prompt which is properly placed before typing in a new command.

adtc
Автор

please help me find Executable in Xcode 4.2.1..

sbigmaster
Автор

Since Xcode has been updated how to I get to executables?

nicholasheytens
Автор

gcc -S program.c
Running gcc like that will produce a file called program.s - thats your assembly output

ctutorial