But what about int main(int argc, char *argv[], char *envp[])
As an extension to the guaranteed standard, an additional parameter to main() can, on some systems, be used to gain access to the environment variables. This is isn't guaranteed to work on all compilers, so use it with care if you want to keep your code portable.

is int main(int argc, char *argv[], char *envp[]) the same thing as (int argc, char *argv[])? thanks for the help

"You can lead a man to Congress, but you can't make him think."
"The Grand Old Duke of York
-He had ten thousand men.
-His case comes up next week."
"Roses are red, violets are blue, I'm schizophrenic, and so am I."
"A computer once beat me at chess, but it was no match for me at kick boxing."
"More and more of our imports are coming from overseas."
--George W. Bush
"If it weren't for electricity, we'd all be wacthing TV by candlelight."
--George W. Bush

oh ok, i understand what it is now. some of the programs i downloaded from the previous contests had to use parameters and had a bunch of things dealing with the int argv and char *argv[]. thank you for your help

"You can lead a man to Congress, but you can't make him think."
"The Grand Old Duke of York
-He had ten thousand men.
-His case comes up next week."
"Roses are red, violets are blue, I'm schizophrenic, and so am I."
"A computer once beat me at chess, but it was no match for me at kick boxing."
"More and more of our imports are coming from overseas."
--George W. Bush
"If it weren't for electricity, we'd all be wacthing TV by candlelight."
--George W. Bush

>though somewhat surprising.
Why? C++ was designed with compatibility to C in mind. It boasts that just about any valid C program is also a C++ program. If standard C++ disallowed the standard C headers then any hope of compatibility with C would be destroyed.

They aren't perfectly compatible. There are differences (especially since the C99 standard - which of course is newer than the C++98 standard). There were some things in the older C that C++ didn't allow, and it seems to me that putting all standard library headers in the same namespace would make a lot of sense, without making things irreparably incompatible... thats all.

The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

Nope, I'm talking about Standard C++. I've posted the relevant quotation in the past, but here it is again (ISO/IEC 14882-1998, Annex D.5):

Just in case someone is going to accuse me of recommending C headers in C++ code: I am not. I'm just saying that using C headers in C++ code is permitted by the standard, while old C++ headers like iostream.h are no longer allowed.

Here is one doubt from a newbie.

So does it mean that for c headers we simply write them the way they are (stdio.h) but for c++ headers we use namespace (iostream and then using namespace) ???

>They aren't perfectly compatible.
And they shouldn't be. If they were then they really would be the same language, don't you think? Some differences are to be expected, but not for something as extensively used as the standard library.

>and it seems to me that putting all standard library headers in the same namespace would make a lot of sense
I don't know about you, but I would be terribly annoyed if C++ (with claims of good compatibility with C) refused to compile this

And as we both know, this is no longer valid C. The standards committee agreed that C functions should be in the std namespace, but doing so exclusively would invalidate far too much existing code. So the compromise was made to have two variants of the C standard library, one for namespaces and one for compatibility with C.

>So does it mean that for c headers we simply write them the way they are (stdio.h)
Not quite. While the *.h C headers are supported for compatibility with C code, new C++ code should be written using the C++ headers (cstdio, cstdlib, etc...) and namespaces employed.