C Board  

Go Back   C Board > General Programming Boards > C Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 04-21-2009, 06:54 AM   #16
Complete Beginner
 
Join Date: Feb 2009
Posts: 312
Quote:
Originally Posted by bithub View Post
In the C world, we also have a little handbook (called the C standard) which tells us what we can and what we cannot do. That standard tells us main can be defined 2 different ways:
Code:
int main(void);
int main(int argc, char* argv[]);
Three, actually:

J.5.1 Environment arguments
In a hosted environment, the main function receives a third argument, char *envp[], that points to a null-terminated array of pointers to char, each of which points to a string that provides information about the environment for this execution of the program (5.1.2.2.1).


I wouldn't recommend using *envp[], though.

Greets,
Philip
__________________
All things begin as source code.
Source code begins with an empty file.
-- Tao Te Chip
Snafuist is offline   Reply With Quote
Reply

Tags
divide, division, string, word

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
C++ ini file reader problems guitarist809 C++ Programming 7 09-04-2008 06:02 AM
[Inheritance Hierarchy] User Input on program with constructors. How ? chandreu C++ Programming 8 04-25-2008 02:45 PM
We Got _DEBUG Errors Tonto Windows Programming 5 12-22-2006 05:45 PM
Another overloading "<<" problem alphaoide C++ Programming 18 09-30-2003 10:32 AM
lvp string... Magma C++ Programming 4 02-27-2003 12:03 AM


All times are GMT -6. The time now is 01:55 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

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