C++ Linked List node counting (need help)
问题 I'm trying to create a program that gets string input from a text file, inserting the content into a list, word by word. I also have to calculate the numbers of the duplicates. My program works fine for the small input text file (1 line of string). But whenever I feed it with a bigger text file, it crashes. Any help will be great. Here is my code: #include <iostream> #include <fstream> #include <sstream> using namespace std; class Bag { private: struct BagNode { string dataValue; int