bash$ countwords hello there how are you? how how are there how how you are? Ctrl-D are : 2 are? : 1 hello : 1 how : 5 there : 2 you : 1 you? : 1 bash$
bash$ concordance hello there how are you? how how are there how how you are? Ctrl-D are : 1, 2 are? : 2 hello : 1 how : 1, 2 there : 1, 2 you : 2 you? : 1 bash$
#include "Array.h" #include <iostream> int main() { Array<const char*> s(3); s[0] = "one"; s[1] = "two"; s[2] = "three"; s[3] = "four"; // this line should cause an exception to be thrown for (int i = 0; i < s.size(); i++) std::cout << s[i] << std::endl; }Also make sure that you can correctly catch the exception in main() and continue executing the program.