>Hi,
>
[quoted text clipped - 15 lines]
>2. When I use main(int argc, char** argv) declaration, the argv is exactly
>what the script passes it.
I don't understand how that can be. For function parameter declarations,
and only function parameter declarations, char** and char*[] mean the same
thing, pointer-to-pointer to char. Similarly, and again, in only this
context, char* and char[] mean the same thing, which is pointer to char.
>For example: a script calls this executable and passes in data => this-is-me
>When it executes the C++ program, the argv contains exactly => this-is-me
>
>So, what is the difference between these two declarations? Why does the
>first one contains garbage characters?
There is no difference. So there necessarily is some other difference,
which could be a compiler bug, though I cannot recall ever hearing of a
compiler bug such as this. How are you determining what the strings
contain?
>Please help me to understand. I am fairly new at Visual C++.
If you are a newcomer to C++, don't feel bad, because arrays and pointers
are not the same thing at all, even though the syntax sometimes disagrees,
all in the interest of helping you declare things the way the language
designer thought you'd use them. The C FAQ has a lot of good information on
the subject:
6. Arrays and Pointers
http://c-faq.com/aryptr/index.html

Signature
Doug Harrison
Visual C++ MVP
How do you access the arguments in both cases? Can you show some code?
The correct way with char argv[] is:
int main(int argc, char argv[])
{
if (argc>1)
printf("1st program argument=%s\n", argv[1]);
else
printf("Program %s is running without arguments\n", argv[0]);
}
--
Cholo Lennon
Bs.As.
ARG
> Hi,
>
[quoted text clipped - 25 lines]
>
> Many Thanks