I know how to get the parameters from the command line. I also know how to print them out.
The problem I'm having is how to compare the parameters from the argv[] array to a string. The progam runs but never returns a result where the parameter string is equal to the one I'm looking for.
Thanks in advance.
// Testing.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
for (int i = 0; i < argc; i = i + 1)
{
if (argv[i] == _T("find"))
{
wcout << "found at position " << i << endl;
}
else
{
wcout << "not found at " << i << endl;
}
}
return 0;
}