Re: dependent name is not a type prefix with 'typename' to indicate a type

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



"Microsoft" <jinling_liang@xxxxxxxxxxxxxx> wrote in message
news:%23kIX95P%23IHA.4784@xxxxxxxxxxxxxxxxxxxx
following is a part of my codes, it's complied good under win2k
with VC 6.0, however there pop up an error under WinXP with VS2005,

Error message : "syntax error : identifier 'iterator'"
Error happend codes:

typedef void (CALLBACK * SAVEITEMCALLBACK)(RecSetType *recSet,
Container::iterator iter); //Error pop up

I assume you have read the documentation about this particular error. It
describes the problem in detail. In what way do you find the
documentation lacking? Which part of it is unclear?

http://msdn.microsoft.com/en-us/library/tsx7wabs.aspx

typedef void (CALLBACK * SAVEITEMCALLBACK)(
RecSetType *recSet,
typename Container::iterator iter);

--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925


.