Possible Duplicate:
What is the difference between _tmain() and main() in C++?
OK, I have not clue of what is the problem here. I am trying to read some file names by using the argv in C++ but for some reason only the first character of the file name gets passed. I show you some part of the code.
int _tmain(int argc, char * argv[])
{
int i;
char *s1 = argv[1];
printf("%s\n", s1);
for( i=1; i<argc; i++ )
printf("%s\n", argv[i]);
return 0;
}
//The argv[1] I am passing is a file name like "TestFile.txt"
//The print out that I am getting is:
//T
//T
What is the problem here? Any help would be very much appreciate. Thanks.