access to argc and argv outside of main()

Need help with C, C++, perl, python, etc?

access to argc and argv outside of main()

Postby oliver67 » 2007-03-08 09:33

Hi,

are argc and argv stored globally, so a function can access to them directly?

Regards
Oliver
oliver67
 
Posts: 10
Joined: 2007-01-12 07:38

Postby lacek » 2007-03-08 13:35

No, they are parameters to main(). You have to find a way to pass them to other methods in order to access them from elsewhere.

We are talking about C, aren't we? :-)
lacek
Moderator Team Member
 
Posts: 769
Joined: 2004-03-11 18:49
Location: Budapest, Hungary


Return to Programming

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable