main() ; argv[1] = string at argv[0]???

This is a discussion on main() ; argv[1] = string at argv[0]??? within the C Programming forums, part of the General Programming Boards category; I have been reading thru the FAQ and looking at snippets and source code, but am somewhat confused how main() ...

  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    12

    main() ; argv[1] = string at argv[0]???

    I have been reading thru the FAQ and looking at snippets and source code, but am somewhat confused how main() works. It seems that in several places that this function somehow contains the name of a text file(argv[0]) and the file as a string in argv[1]. Is this only the case when a text file is sent to the function which has only 2 argument parameters (argc) whose values are argv[0] and argv[1]. ......hmmm,, I maybe answering my own questions, but if you could clarify further I would appreciate. Thanks ahead of time. UC

  2. #2
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C++ ini file reader problems
    By guitarist809 in forum C++ Programming
    Replies: 7
    Last Post: 09-04-2008, 07:02 AM
  2. Inheritance Hierarchy for a Package class
    By twickre in forum C++ Programming
    Replies: 7
    Last Post: 12-08-2007, 04:13 PM
  3. RicBot
    By John_ in forum C++ Programming
    Replies: 8
    Last Post: 06-13-2006, 07:52 PM
  4. Compile Error that i dont understand
    By bobthebullet990 in forum C++ Programming
    Replies: 5
    Last Post: 05-05-2006, 10:19 AM
  5. problems with overloaded '+' again
    By Brain Cell in forum C++ Programming
    Replies: 9
    Last Post: 04-14-2005, 06:13 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21