It looks like your compiler is having issues with the fact that getEmployee() throws an exception on the last line and doesn't return a value. Since the exception is thrown, no return value should be necessary.
To get it to compile, you can add this as the last line of that method:
return mEmployees[0];
Note that that line will never actually be executed.
I'm curious to know what compiler/verison you're using...
----
Scott J. Kleper
Author, "Professional C++"
(Wrox, 2005)
|