?
Solved

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

Posted on 2003-03-08
3
Medium Priority
?
1,277 Views
Last Modified: 2008-10-13

    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
Comment
Question by:WiB
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
bkrahmer earned 150 total points
ID: 8095574
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
 
LVL 3

Author Comment

by:WiB
ID: 8098359
In my case it was enough just
::STATSTG
0
 
LVL 3

Author Comment

by:WiB
ID: 8098360
:o)
thank you, Brian
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses
Course of the Month11 days, 7 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question