Day 24/100 100 Days of Code

Photo by Andrew Neel on Unsplash

Day 24/100 100 Days of Code

Info Hunter

The program extracts the URLs and keywords from the text fields by assigning their values to std::strings. This is where I started replacing strings with wstrings.

      if (!keywords1[i]->GetValue().empty())
        {
            std::wstring getKeyword = keywords1[i]->GetValue().wc_str();
            std::wcout << "Keyword: " << getKeyword << std::endl;

            handler.WriteSavedSearchOptions(getKeyword,
                                            getUrlValue);
        }

I also changed the WriteSavedSearchOptions method to accept wstrings as the keyword arguments.

    void WriteSavedSearchOptions(std::wstring &keyword, std::string &url);

However, for some reason, I was unable to extract the input text. I tried using setlocale but to no avail. I think there is something I am missing with C++ and locale. I will try to learn more about that tomorrow.