编译时出现如下错误:
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\policeoffice.h(25): error C2143: syntax error : missing ';' before '*'
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\policeoffice.h(25): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\policeoffice.h(25): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\policeoffice.h(25): warning C4183: 'GetPolice': missing return type; assumed to be a member function returning 'int'
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\policeoffice.h(31): error C2143: syntax error : missing ';' before '*'
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\policeoffice.h(31): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\policeoffice.h(31): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\policeoffice.h(14): error C2065: 'police' : undeclared identifier
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\policeoffice.h(14): error C2061: syntax error : identifier 'Police'
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\policeoffice.h(16): error C2065: 'police' : undeclared identifier
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\policeoffice.h(21): error C2065: 'police' : undeclared identifier
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\policeoffice.h(22): error C2065: 'police' : undeclared identifier
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\policeoffice.h(22): error C2541: 'delete' : cannot delete objects that are not pointers
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\policeoffice.h(38): error C2065: 'police' : undeclared identifier
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\policeoffice.h(38): error C2061: syntax error : identifier 'Police'
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\policeoffice.h(45): error C2065: 'police' : undeclared identifier
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\policeoffice.h(45): error C2061: syntax error : identifier 'Police'
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\policeoffice.h(52): error C2143: syntax error : missing ';' before '*'
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\policeoffice.h(52): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\policeoffice.h(52): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\policeoffice.h(55): error C2065: 'police' : undeclared identifier
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\policeoffice.h(55): error C2228: left of '.Name' must have class/struct/union
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\policeoffice.h(56): error C2065: 'police' : undeclared identifier
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\policeoffice.h(69): error C2065: 'police' : undeclared identifier
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\policeoffice.h(69): error C2228: left of '.Name' must have class/struct/union
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\policeoffice.h(69): error C2065: 'police' : undeclared identifier
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\policeoffice.h(69): error C2228: left of '.GetReward' must have class/struct/union
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\main.cpp(13): error C2065: 'p' : undeclared identifier
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\main.cpp(15): error C2065: 'p' : undeclared identifier
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\main.cpp(16): error C2065: 'p' : undeclared identifier
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\main.cpp(16): error C2227: left of '->Arrest' must point to class/struct/union/generic type
1>
type is ''unknown-type''
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\main.cpp(18): error C2065: 'p' : undeclared identifier
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\main.cpp(18): error C2227: left of '->Arrest' must point to class/struct/union/generic type
1>
type is ''unknown-type''
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\main.cpp(20): error C2065: 'p' : undeclared identifier
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\main.cpp(21): error C2065: 'p' : undeclared identifier
1>c:\users\xlong\documents\visual studio 2010\projects\exercise\exercise\main.cpp(21): error C2227: left of '->Arrest' must point to class/struct/union/generic type
1>
type is ''unknown-type''
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========