View Single Post
  #2 (permalink)  
Old March 4th, 2007, 01:22 AM
ssawe ssawe is offline
Registered User
 
Join Date: Mar 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The cmd line args are passed to Main as an "array of pointers to cstrings". Therefore your code should be something like this to find the 0.

for ( int i=0; i< argc; i++)
{
  char* arg = argv[i];
  while(*arg)
  {
    arg++;
  }
  // arg now points to '\0'
}



Reply With Quote