EX-99.2N 49 consent.htm E&Y CONSENT LETTER consent

CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM

We consent to the reference to our firm under the captions "Financial Highlights" and "Counsel and Independent Registered Public Accounting Firm" and to the use of our report dated December 8, 2005, which is incorporated by reference, in this Registration Statement (Form N-1A 33-41078 and 811-6325) of Dreyfus Midcap Index Fund.

ERNST & YOUNG LLP

New York, New York
February 21, 2006