Error C2872 Ambiguous Symbol
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business error c2872 'dword' ambiguous symbol Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation error c2872 'filetime' ambiguous symbol Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like error c2872 'idataobject' ambiguous symbol you, helping each other. Join them; it only takes a minute: Sign up Ambiguous symbol error? up vote 6 down vote favorite int ii, maxnum; for(ii=1; ii<=num-1; ii++) { if(count[ii]>max) { // the part where I get
Error C2872 'string' Ambiguous Symbol
C2872 Ambiguous Symbol error max = count[ii]; // the part where I get C2872 Ambiguous Symbol error maxnum = ii; } } I've never gotten this error and this is frustrating. c++ compiler-errors share|improve this question edited Feb 28 '12 at 3:31 Andrew Marshall 63.5k11134153 asked Feb 28 '12 at 3:29 Haxify 1072312 add a comment| 1 Answer 1 active oldest votes up vote 13 down vote accepted Your variable max conflicts with std::max(). Try using error c2872 'hash' ambiguous symbol a different name and it ought to fix that error. share|improve this answer answered Feb 28 '12 at 3:32 FatalError 28.7k65681 4 It's reasons like this that make using namespace std; such a nightmare. –Andrew Marshall Feb 28 '12 at 3:32 Thank you that worked! –Haxify Feb 28 '12 at 3:33 1 Rather than renaming max I would advice not to use the using directive using namespace std; for exactly this reason. –David Rodríguez - dribeas Feb 28 '12 at 3:57 or explicitly define the namespace of max (::max) –outmind Mar 8 '13 at 19:08 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged c++ compiler-errors or ask your own question. asked 4 years ago viewed 16930 times active 2 months ago Related 98GCC compile error with >2 GB of code3function pointer - ambiguous symbol error1error C2593: 'operator =' is ambiguous1getting error for ambiguous symbol and need help to remove it0Simple code - Unresolved external symbol - c++1c++ compile error- LN
resources Windows Server 2012 resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners ISV Startups TechRewards Events Community Magazine Forums Blogs Channel 9 Documentation APIs and reference Dev centers Retired content Samples We’re error c2872 'iserviceprovider' ambiguous symbol sorry. The content you requested has been removed. You’ll be auto redirected in 1
Ambiguous Symbol Definition
second. C/C++ Building Reference C/C++ Build Errors Compiler Errors C2800 Through C2899 Compiler Errors C2800 Through C2899 Compiler Error C2872
Ambiguous Symbol Visual Studio
Compiler Error C2872 Compiler Error C2872 Compiler Error C2800 Compiler Error C2801 Compiler Error C2802 Compiler Error C2803 Compiler Error C2804 Compiler Error C2805 Compiler Error C2806 Compiler Error C2807 Compiler Error C2808 Compiler http://stackoverflow.com/questions/9475999/ambiguous-symbol-error Error C2809 Compiler Error C2810 Compiler Error C2811 Compiler Error C2812 Compiler Error C2813 Compiler Error C2814 Compiler Error C2815 Compiler Error C2817 Compiler Error C2818 Compiler Error C2819 Compiler Error C2821 Compiler Error C2823 Compiler Error C2824 Compiler Error C2825 Compiler Error C2827 Compiler Error C2828 Compiler Error C2829 Compiler Error C2830 Compiler Error C2831 Compiler Error C2833 Compiler Error C2834 Compiler Error C2835 Compiler Error C2838 Compiler https://msdn.microsoft.com/en-us/library/t57wswcs.aspx Error C2839 Compiler Error C2842 Compiler Error C2843 Compiler Error C2844 Compiler Error C2845 Compiler Error C2846 Compiler Error C2847 Compiler Error C2849 Compiler Error C2850 Compiler Error C2854 Compiler Error C2855 Compiler Error C2856 Compiler Error C2857 Compiler Error C2858 Compiler Error C2859 Compiler Error C2860 Compiler Error C2861 Compiler Error C2862 Compiler Error C2863 Compiler Error C2864 Compiler Error C2865 Compiler Error C2867 Compiler Error C2868 Compiler Error C2869 Compiler Error C2870 Compiler Error C2871 Compiler Error C2872 Compiler Error C2873 Compiler Error C2874 Compiler Error C2875 Compiler Error C2876 Compiler Error C2877 Compiler Error C2878 Compiler Error C2879 Compiler Error C2881 Compiler Error C2882 Compiler Error C2883 Compiler Error C2884 Compiler Error C2885 Compiler Error C2886 Compiler Error C2888 Compiler Error C2890 Compiler Error C2891 Compiler Error C2892 Compiler Error C2893 Compiler Error C2894 Compiler Error C2896 Compiler Error C2897 Compiler Error C2898 Compiler Error C2899 TOC Collapse the table of content Expand the table of content This documentation is archived and is not being maintained. This documentation is archived and is not being maintained. Compiler Error C2872 Visual Studio 2015 Other Versions Visual Studio 2013 Visual Studio 2012 Visual Studio 2010 Visual Studio 2008 Visual Studio 2005 Visual
Ambiguous Symbol error, specifically: “error C2872: 'IMasterLoader' : ambiguous symbol” when using an interface I wrote in http://geekswithblogs.net/THines01/archive/2011/04/20/ambiguoussymbol.aspx C# with a class built in C++. 1: namespace IMasterLoader 2: { 3: public interface IMasterLoader
Forum Visual C++ & C++ Programming Visual C++ Programming Need to solve error C2872: ambiguous symbol If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register or Login before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 9 of 9 Thread: Need to solve error C2872: ambiguous symbol Tweet Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode October 25th, 2004,03:43 PM #1 lavachequirit View Profile View Forum Posts Member Join Date Aug 2004 Posts 29 Need to solve error C2872: ambiguous symbol Hi all, I have a header a.h that contains: Code: enum eActionA { eSystem, eReset, eEnum }; int methodeA( eActionA iAction); and a b.cpp file that contains: Code: enum eActionB { eBlah, eReset, eBlah2 }; int methodeB() { ... case eReset: // the error is yielt here ... } I got the error: "error C2872: 'eReset' : ambiguous symbol" on the indicated line. Could someone help me solve this probleme? I just can't remove the enum in a.h since I'm using it as parameter for a methode in the same header. Is there a way to specify to b.cpp which enum to use? Thanks a lot for your answer! LaVacheQuiRit Reply With Quote October 25th, 2004,04:05 PM #2 TSYS View Profile View Forum Posts Senior Member Join Date Oct 2002 Posts 1,134 Re: Need to solve error C2872: ambiguous symbol Can't you just cast it? Code: case (eActionB)eReset: Regards Robert Thompson Reply With Quote October 25th, 2004,04:09 PM #3 lavachequirit View Profile View Forum Posts Member Join Date Aug 2004 Posts 29 Re: Need to solve error C2872: ambiguous symbol No TSYS, It just give the same error... LaVacheQuiRit Reply With Quote October 25th, 2004,04:18 PM #4 MrViggy View Profile View Forum Posts Elite Member Power Poster Join Date Feb 2002 Posts 4,640 Re: Need to solve error C2872: ambiguous symbol You can't do that, the enumeration names are clashing. However, you can enclose your enumerations inside different namespaces: Code: namespace