I have a program:
int _tmain(int argc, char* argv[])
{
std::cout << "STARTING" << std::endl;
std::cout << "Num inputs: " << argc << std::endl;
for(int i = 0; i < argc; i++)
std::cout << argv[i] << std::endl;
that I expect to print out all the command line arguments. However, the output is this:
./Test.exe hello world
STARTING Num inputs: 3 . h w
It appears that it's only looking at the first char in each argument and not the entire char* till termination character.
Anyone have any thoughts?
Additional Notes: Creating it through VS2008, and I am essentially copying and pasting an example on the internet that should work. I have run the program in bash, powershell, and cmd.