Question: I've working on this code for quite a while and I can't find how to make this case insensitive

```
#include <iostream>
#include <string>
#include <sstream>
using namespace std;

int findCountry(string arr[], int len, string seek)
{
    for (int i = 0; i < len; ++i)
    {
        if (arr[i] == seek) return i;
    }
    return -1;
}

int main(){
    string countries[5]={"Brunei", "Cambodia", "East Timor", "Indonesia", "Laos"};
    string capitals[5]={"Bandar Seri Begawan", "Phnom Penh", "Dili", "Jakarta", "Vientiane"};

    string country;

    cout << "Country: ";
    cin >> country;

    int index = findCountry(countries,5,country);
     if (index >= 0)
        cout << "Capital: " << capitals[index];
    else
        cout << country << " is not a South East Asian Country";

    return 0;
}

```

OUTPUT

```
Country: bRunEi
bRunEi is not a South East Asian Country

```

Expected OUTPUT

```
Country: bRunEi
Capital: Bandar Seri Begawan

```

I was instructed to use cstring header but this is the only thing I can guess, any help will be appreciated
ps: sorry for bad english

Answer: 
It appears that each `ptm` is a scalar array.

To obtain the scalar equivalent of a scalar array `ptm`, use `ptm.item()` ([documentation](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.item.html)).

So instead of appending `ptm` to `inside`, try appending `ptm.item()`.

Alternatively, appending `float(ptm)` should accomplish the same task. If this needs to be an integer, append `int(ptm)` instead.

**Remark**

To obtain the scalar equivalent of a scalar array, one used to be able to use `numpy.asscalar()`. However, that function is now deprecated. The [documentation](https://numpy.org/doc/stable/reference/generated/numpy.asscalar.html) says to use the `item()` method instead.
If I understand properly what you are trying to do, you just need to append `ptm[0]` (i.e the first - and only - integer of the array `ptm`) instead of `ptm`.