0

Code:

     virtual void DeleteItem(_bstr_t ItemName) = 0

Error:

      error C2061: syntax error : identifier '_bstr_t'

i tried google online and use #include but it doesnt remove the error

any other way to resolve this?

user1157977
  • 907
  • 1
  • 11
  • 17
  • 2
    What are your #includes? – Brett Jun 22 '16 at 01:59
  • 1
    [This page](https://msdn.microsoft.com/en-us/library/zthfhkd6.aspx) says you should `#include ` - if that's not working for you, try `cl /E` to see preprocessor output, and see if you can see either `_bstr_t` defined or some `#ifdef` branch that bypasses it. – Tony Delroy Jun 22 '16 at 02:00

1 Answers1

0

Add #include <comdef.h>(where _bstr_t definition included) to your include file, for example stdafx.h.

lulyon
  • 6,707
  • 7
  • 32
  • 49