Mail Archives: djgpp/1998/09/09/14:01:36
Goh Yong Kwang (s6606555 AT mercury DOT np DOT ac DOT sg) wrote:
This is probably off-topic for this newsgroup, but what the heck....
: ===================================================
: #include <stdio.h>
: // This program prints out all arguments passed to it from the command.
: main(char *argv[], char argc){
Bingo! You've got the parameters backwrds, the first one is the argument
count (argc) and the second one the argument vector. Also note that
argc is an int, not a char. It should read:
main(int argc, char *argv[]){
--
---- Fred Smith -- fredex AT fcshome DOT stoneham DOT ma DOT us -----------------------------
For the wages of sin is death,
but the gift of God is eternal life in Christ Jesus our Lord
------------------------------ Romans 6:23 (niv) ------------------------------
- Raw text -