Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1285
  • Last Modified:

error c2872... : ambiguous symbol (Managed C++)


    using System::Runtime::InteropServoces;
    ...
    LPSTREAM     pStreamFile;
    STATSTG      StatInfo;
    ...
    pStreamFile->Stat(&StatInfo, STATFLAG_NONAME);
    ...

Line "STATSTG StatInfo;"
gives me error:
error C2872: 'STATSTG' : ambiguous symbol

What is possible to do?
0
WiB
Asked:
WiB
  • 2
1 Solution
 
bkrahmerCommented:
There are apparently multiple definitions of STATSTG that your compiler cannot properly scope.  (it's not fully qualified.)  Example: I would use std::string, instead of string.

brian
0
 
WiBAuthor Commented:
In my case it was enough just
::STATSTG
0
 
WiBAuthor Commented:
:o)
thank you, Brian
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now