LibIsolationForest icon indicating copy to clipboard operation
LibIsolationForest copied to clipboard

C++ - command line argument compare

Open tophe38 opened this issue 3 years ago • 0 comments

Hi,

in main.cpp, line 149 and 153, it would be better to use strcmp() instead of strstr() to identify command line argument.


	// Parse the command line arguments.
	for (int i = 1; i < argc; ++i)
	{
		if ((strcmp(argv[i], "outfile") == 0) && (i + 1 < argc))
		{
			outStream.open(argv[i + 1]);
		}
		if (strcmp(argv[i], "dump") == 0)
		{
			dump = true;
		}
	}

tophe38 avatar May 27 '21 12:05 tophe38