Hi, I was given an assignment to create Boolean search that that will look through a list of 20 names and return the position in the array that the name is in (Some people here will probably recognize the program, I'm sure my class book is commonly used). Here's the code:

Code:
#include <iostream>
#include <string>
using namespace std;

int main()
{
	const int SIZE = 20;
   
	string name[SIZE] = 
	{"Collins, Bill",  "Smith, Bart",  "Michalski, Joe", "Griffin, Jim",
    "Sanchez, Manny", "Rubin, Sarah", "Taylor, Tyrone", "Johnson, Jill", 
    "Allison, Jeff",  "Moreno, Juan", "Wolfe, Bill",    "Whitman, Jean",
    "Moretti, Bella", "Wu, Hong",     "Patel, Renee",   "Harrison, Rose",
    "Smith, Cathy",   "Conroy, Pat",  "Kelly, Sean",    "Holland, Beth"};
	
	int startScan, minIndex;
	string fullname;
	for (startScan = 0; startScan < (SIZE - 1); startScan++)
	{
		minIndex = startScan;
		fullname = name[startScan];
		for(int index = startScan + 1; index < SIZE; index++)
		{
			if (name[index] < fullname)
			{
			fullname = name[index];
			minIndex = index;
			}
		}
		name[minIndex] = name[startScan];
		name[startScan] = fullname;
	}
	
	string inputname;
	cout << "Enter a name and I will tell you what alphabetical position they are in.\n";
	cout << "Names should be entered in format 'Last, First'.\n";
	getline(cin, inputname);
	cout << endl;

	for (int count = 0; count < SIZE; count++)
		{
			cout << name[count] << " \n";
		}

	int first = 0;
	int last = SIZE - 1;
	int middle;
	int position = -1;
	bool found = false;

	while (found = false && first <= last)
	{
		middle = ((first + last) / 2);
		if (name[middle] == inputname)
		{
			found = true;
			position = middle;
		}
		else if (name[middle] > inputname)
			last = middle - 1;
		else if (name[middle] < inputname)
			first = middle + 1;
	}
	if (position == -1)
	{
		cout << "That person is not on the list\n";
	}
	else
		cout << inputname << " is position " << position << " of 20.\n";

	return 0;
}
It probably looks a bit messy since I haven't organized it into functions yet, but hopefully it's legible. It runs without any problems, but when I enter the name, for some reason it always tells me the name isn't on the list, even if it is (For example, entering "Moreno, Juan" should return position 10, but instead, it just says it's not on the list). My best guess is that position isn't changing and instead remains at -1, but I can't quite understand why this is happening.

Any help with this is greatly appreciated, it's confused me into a corner.