Change code style to STL and compare their efficiency.
3.accept some ints from standard input, then sort them and output to standard output. Please use STL as far as possible.
1.What are the types of std::cin and std::cout? Write a console program ECHO that can be invoked by the following ways:
2.Try your best to write a class to implement two-dimensional arrays like built-in type.
3.write a program to process students’ scores table(by using map/multimap).
a.student infomation is like this:
name, C++ basic score, C++ OOP score, C++ template score, C++ STL score, C++ MFC score
b.sort by name.
d.traverse infotable and generate the total score and average score to another table.
e.output name, total score, average score and place for each student sorting by place.
write a program to read words and calculate every word’s frequency from a file. Output the 20 words and frequency with most high frequency.
How and when is std::auto_ptr used? can std::auto_ptr be put on argument list? why?
Compare vector with deque. When do we use each?
What does the following code do? write a better method.
4.what does the std::remove() algorithm do? Does the algorithm remove what should be removed really? What’s the difference in size and capacity between before and after? Write the right remove method.
5.write a file_iterator，and 3 functors，to make the following code work：
the test case(the program name is mydir)：
1.you want to write a class template C that can be instantiated only on types that have a member function named Clone() that takes no parameters and returns a pointer to the same kind of object.
Note: It’s obvious that if C writes code that just tries to invoke T::Clone() without parameters, then such code will fail to compile if there isn’t a T::Clone() that can be called without parameters.
2.try the following code in VC6 and VC.net 2003 seperately: