Day 2/100 100 Days of Code

Info hunter

I implemented a read settings function to be used when a search is executed. Currently, it reads the CSV line by line which will be delimited during execution to separate keywords and URLs.

I also removed the URL counter function and file as they are not needed anymore.

The problem is that running a search for each keyword will be quite slow. Searching for all the keywords in a run would be better.

Here's my code:

void CSV_Handler::ReadSettings()
    std::ifstream settingsCSV;"../settings/settings.csv");

        std::cout << std::strerror(errno) << std::endl;

    std::string column;
    std::vector<std::string> keywordsAndUrls;

    while(getline(settingsCSV ,column, '\n'))

    for (const auto &content : keywordsAndUrls)
        std::cout << "Content: " << content << std::endl;


This works but I need to separate URLs and keywords here.