| | |
Reading from the Command line
Thread Solved |
•
•
Join Date: Oct 2009
Posts: 91
Reputation:
Solved Threads: 8
0
#2 19 Days Ago
•
•
•
•
Hey,
How do you read from the command line in C? I need to read 10 arguments from the command line. Can I use char* argv[] as a parameter in the main function to do so?
Thanks.
int main(int argc, char** argv)
where argc is the number of command-line parameters and argv is an array containing pointers to the parameters.
argv[0] is the program name itself.
![]() |
Similar Threads
- Code Snippet: Building argv from command line (Python)
- command line argument -- ruby (Ruby)
- Command line (C)
- reading from command line (Java)
- about command line input (Java)
- Reading in a .dat file from SSH shell command line (Java)
- command line (OS X)
Other Threads in the C Forum
- Previous Thread: need help!!! to fix my program please!!!
- Next Thread: Merge sort or an alternative..
| Thread Tools | Search this Thread |
adobe api array arrays binarysearch calculate char cm convert copyanyfile copypdffile cprogramme createcopyoffile createprocess() csyntax directory dynamic feet fflush file floatingpointvalidation fork forloop frequency getlasterror givemetehcodez global graphics gtkgcurlcompiling hacking hardware highest homework i/o ide inches incrementoperators intmain() iso kernel kilometer km linked linkedlist linux linuxsegmentationfault list locate logical_drives loopinsideloop. match matrix microsoft motherboard mqqueue mysql oddnumber odf open opensource openwebfoundation owf pattern pdf performance pointer posix power probleminc program programming pyramidusingturboccodes read recursion recv recvblocked repetition research scanf scheduling segmentationfault send shape socketprograming socketprogramming stack standard strchr string suggestions systemcall test unix urboc user variable voidmain() wab win32api windows.h





