r/C_Programming•
Shakalolxz

New to C need some help with arguments

Question

Hello, as said in the title new to C and I'm currently stuck with some homework. I need to use command line arguments and i believe what i can't do is a called a flag... For example to introduce the argument that would be the file name it would be like this: -i filename.txt I could make my program just by using one argument but i'm asked to specifically have this -i. Not sure if this explanation clear or not but i'm honestly really lost with this. I have tried searching for it in google but couldn't find anything so would appreciate any help!

Posted Feb 25, 2016, 12:53 AM UTC

19
Loading comments…