I'm trying to make billing system for my father's restaurant just for practice. The problem is that the program doesn't read the complete string one time.e.g If there were "Chicken burger" in txt file then the compiler reads them but break them into two words. I'm using the following code and the file is already exist.
std::string item_name;
std::ifstream nameFileout;
nameFileout.open("name2.txt");
while (nameFileout >> item_name)
{
std::cout << item_name;
}
nameFileout.close();