Here's my problem. I have to read a line from the console, for example:
Name,Area,Cost
Then using the comma as the delimiter character, it has to name, area and cost and place them into their corresponding variable to be placed in a hash table. Then using a loop the program needs to continuously do this until the user types the exit statement to exit the loop. Which it adds to the variables just fine, but when I type exit, it just waits for what I assume is the delimiter character. But even then it doesn't exit.
Here's the whole code so far:
while (true) {
        getline(cin, name, ',');
        if (name == "exit") {
            break;
        }
        getline(cin, area, ',');
        cin >> cost;
        
        //code to see if the variables are placed
        cout << "results" << endl;
        cout << name << endl;
        cout << area << endl;
        cout << cost << endl;
        
}
    //code to check for exit
cout << "Loop has exited" << endl;
 
    