C++ curious behavior in vector::push_back()
问题 I have the following data-structure as a class named "Task": private: string name; int computation_time; int period; Furthermore i have a ASCII-File with this content: A 3 10 B 2 12 C 1 11 name = A, computation_time = 3, period = 10 and so on.... Now i want to read in the file, create Task-object and push it back into a vector: void read_in_task_list_and_create_tasks(const string &filename, vector<Task> ¤t_tasks) { ifstream in_file; in_file.open(filename.c_str()); string tmp_name; int