0 Reputation Points
100% Quality Score
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
3 Posted Topics
You could try changing the declaration of the template to: [CODE]template <typename T> T maxn(T a[], const int n); [/CODE] This makes it more obvious what the specialisation should be: [CODE]template <> char* maxn<char*>(char* a[], const int n); [/CODE] You can then create an array of strings to pass in …
In Directory::Search(), you get the name using cin. But cin stops at the first whitespace. Since most of the names in address.txt contain some, it will never match. Have a look at the sticky thread at the top of this forum for some hints on handling console input.
It's probably line #15, the % operator needs an integer on the left. Try declaring sum1 as an integer.
The End.
DavidRead