I'm using Windows XP and Visual Studio 200.
I have a command line program named test1. There are three arguments that are passed to it:
1. Name of the program
2. Input 1 (SMILES String)
3. Input 2 (fragment)
I figured out how to get/print the first letter from each argument:
I'm wandering how you get all of the letters (argv[something?]. Basically, I would like to set the 3 different arguments to 3 different variablesCode:#include <stdio.h> #include "stdafx.h" int _tmain(int argc, _TCHAR* argv[]) { int i; int correctParams = 1; if ( argc != 3 ) { printf( "Enter a Smiles string and fragment your searching for\n" ); correctParams = 0; } if (correctParams == 1) { for (i = 0; i < argc; i++) if (i == 2) { printf("argv[%d] = \"%s\"\n", i, argv[i]); } } return 0; }