// Bjarne Stroustrup 7/25/2009 // Chapter 6 Exercise 4 #include "std_lib_facilities.h" // note that different compilers/SDEs keep header files in different places // so that you may have to use "../std_lib_facilities.h" or "../../std_lib_facilities.h" // the ../ notation means "look one directly/folder up from the current directory/folder" /* enter name-and-value pairs into a vector check that each name is unique exit when we see the input "NoName 0" output the pairs */ class Name_value { // much like Token from 6.3.3 public: Name_value(string n, int s): name(n), score(s) { } string name; int score; }; int main() try { vector pairs; string n; int v; while (cin>>n>>v && n!="NoName") { // read string int pair for (int i=0; i