I am trying to calculate the various combinations that you could have. Matched, Not-Matched, Not-In. I had the function:
		//Local variables
		int w = 0;
		char x[4]; //szMatch is users choice
		char y[4]; //total is computers choice
		CString matches="";

		//Get an array of the colors to check each letter for a match
			x[w]=szMatch.GetAt(w);  //Sets x[w] with users choice colors
			y[w]=total.GetAt(w);    //Sets y[w] with computers choice colors

		//reset w to zero so we can use it again

			if(x[w]==y[w])       //We have a match
				matches=matches+"I ";
			else if(x[w]==y[0]||x[w]==y[1]||x[w]==y[2]||x[w]==y[3])  //Not a match, but in the combo
				matches=matches+"O ";
			else                 //Default, no match
				matches=matches+"X ";
But when you pick say: Blue Blue Blue Blue, and Blue is only in the first match, the other 3 Blue's say that they are Not a match, but in the combo. This is confusing to people who do not expect that. So I tried to write another fucton for this and it was getting very long using if/else so I scrapped that idea.

Anyone have a better way to do this?