{
Line (_T (" zhang "), 0.4, 0.6, Color (0, 0), 1, 1),
The line (_T (" li si "), 0.4, 0.6, Color (25, 25112), 1, 2),
The line (_T (" detective "), 16000, 22000, Color (205, 38, 38), 2, 1),
The line (_T (" z "), 8000, 15000, Color (31), 156102, 2, 2),
. Later still has a lot of
};
I want to directly through someone's name, such as zhang SAN to get his grades or modify points how to implement? I know by arrstu [0]. Score to get or modify, but when not remember zhang SAN in the array position in the table below, may be in 1000 or 999 when how to do? Want to use a hash table but a string associated with an object, want to use the container without vector. The find () this functionality, strives for the big show how to achieve?
CodePudding user response:
First, the string can be used as a STD: : map key, second, names could be repeated, the only should be a student id, should get information by student number and modify.CodePudding user response:
Time array name and group membership of pointer stored in the map, using the map to find operationsCodePudding user response:
You can use a map, a student id or name to do the key, students do the value class, according to the key value can find,CodePudding user response:
Also, "want to use the container without vector. The find () function of the" this sentence is a problem, c + + class, provides the algorithm with global inside the find function, can be used to find the data in the vector, the result is an iterator that can modify the score of the iterator, specific usage can baidu,CodePudding user response: