Home > ambiguous symbol > error c2872 ambiguous symbol

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 where T : class 4: { 5: bool Load(T master, ref http://forums.codeguru.com/showthread.php?315462-Need-to-solve-error-C2872-ambiguous-symbol string strError); 6: } 7: }   Code producing the error: 1: // LmCellSectorLog.h 2: #pragma once 3: using namespace System; 4: using namespace System::Collections::Generic; 5: using namespace ambiguous symbol System::Data; 6:   7: namespace LmCellSectorLog { 8: using namespace IMasterLoader; 9: public ref class CLmCellSectorLogLoader : IMasterLoader 10: { 11: public: 12: virtual bool Load(CLmCellSectorLogMaster^ master, String^% strError); 13: }; 14: }     Compiler generated error C2872: 'IMasterLoader' : ambiguous symbol: While searching for a solution to this problem, I encountered the Compiler Error error c2872 ambiguous C2872 (C++) page from MSDN, which didn’t have my exact solution, but led me to think differently about the syntax. Jumping forward to the solution: Assuming the problem was the compiler’s “scope” and recognition of the interface, I eventually changed the reference by fully qualifying the interface name with the “scope resolution operator (::)” and that solved the problem. At that point, it was no longer necessary to reference the interface at the namespace:   1: public ref class CLmCellSectorLogLoader : ::IMasterLoader::IMasterLoader 2: { 3: public: 4: virtual bool Load(CLmCellSectorLogMaster^ master, String^% strError); 5: };     Technorati Tags: code,ambiguous symbol,.net,dot net,CSharp,CPlusPlus,C#,C++ Share This Post:Short Url: http://wblo.gs/biE posted @ Wednesday, April 20, 2011 9:26 AM Print Comments on this entry: #re: Ambiguous Symbol -- Compiler Error C2872 Left by Robin Wernick at 1/3/2013 7:33 PM Like most people you got half of the "if" question right. What if!!! you wanted it to go the other way, then you wouldn't have an answer. The solution shouldn

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

 

Related content

ambiguous symbol error

Ambiguous Symbol Error table id toc tbody tr td div id toctitle Contents div ul li a href Error C Istream Ambiguous Symbol a li li a href Idataobject Ambiguous Symbol a li li a href Ambiguous Symbol Definition a li li a href Shared ptr Ambiguous Symbol a li ul td tr tbody table p 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 relatedl more about Stack Overflow the company Business Learn more about hiring developers p

ambiguous symbol error c2872

Ambiguous Symbol Error C table id toc tbody tr td div id toctitle Contents div ul li a href Error C filetime Ambiguous Symbol a li li a href Error C idataobject Ambiguous Symbol a li li a href Error C string Ambiguous Symbol a li ul td tr tbody table p 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 relatedl about Stack Overflow the company Business Learn more about hiring developers error c dword ambiguous symbol

error 1 error c2872 ambiguous symbol

Error Error C Ambiguous Symbol table id toc tbody tr td div id toctitle Contents div ul li a href Ambiguous Symbol Visual Studio a li li a href C Ambiguous Symbol Namespace a li li a href Error C string Ambiguous Symbol a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to relatedl any questions you might have Meta Discuss the ambiguous symbol definition workings and policies of this site About Us Learn more about Stack p h id Ambiguous Symbol Visual Studio p Overflow the company Business

error 2 error c2872 ambiguous symbol

Error Error C Ambiguous Symbol table id toc tbody tr td div id toctitle Contents div ul li a href Error C string Ambiguous Symbol a li li a href Ambiguous Symbol Visual Studio a li li a href C Ambiguous Symbol Namespace a li ul td tr tbody table p 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 relatedl about Stack Overflow the company Business Learn more about hiring developers or ambiguous symbol definition posting ads

error 2872

Error table id toc tbody tr td div id toctitle Contents div ul li a href C Corral a li li a href Error C cdialogimpl Ambiguous Symbol a li li a href Ambiguous Symbol Definition a li ul td tr tbody table p games PC games error c ambiguous symbol c Windows games Windows phone games Entertainment All Entertainment error c string ambiguous symbol Movies TV Music Business Education Business Students educators p h id C Corral p Developers Sale Sale Find a store Gift cards Products Software services Windows Office Free downloads security Internet p h id Error

error c2872 ambiguous

Error C Ambiguous table id toc tbody tr td div id toctitle Contents div ul li a href Error C filetime Ambiguous Symbol a li li a href Error C string Ambiguous Symbol a li li a href Error C iserviceprovider Ambiguous Symbol a li li a href Ambiguous Symbol Definition a li ul td tr tbody table p resources Windows Server resources Programs MSDN subscriptions Overview Benefits relatedl Administrators Students Microsoft Imagine Microsoft Student Partners error c dword ambiguous symbol ISV Startups TechRewards Events Community Magazine Forums Blogs Channel p h id Error C filetime Ambiguous Symbol p Documentation

error c2872 ambiguous symbol namespace

Error C Ambiguous Symbol Namespace table id toc tbody tr td div id toctitle Contents div ul li a href C Ambiguous Symbol Namespace a li li a href Error C Ambiguous Symbol Visual C a li li a href C Error C a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the relatedl workings and policies of this site About Us Learn more ambiguous symbol definition about Stack Overflow the company Business Learn more about hiring developers or posting error

error symbol is ambiguous

Error Symbol Is Ambiguous table id toc tbody tr td div id toctitle Contents div ul li a href Error C iserviceprovider Ambiguous Symbol a li li a href Error C Ambiguous Symbol C a li li a href Ambiguous Symbol Definition a li ul td tr tbody table p 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 relatedl about Stack Overflow the company Business Learn more about hiring developers or error c ambiguous symbol posting ads

idataobject ambiguous symbol error

Idataobject Ambiguous Symbol Error table id toc tbody tr td div id toctitle Contents div ul li a href Error C Ambiguous Symbol a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to relatedl any questions you might have Meta Discuss the iserviceprovider ambiguous symbol servprov h workings and policies of this site About Us Learn more about Stack cannot use this indirection on type iserviceprovider Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs error c filetime ambiguous symbol

iserviceprovider error

Iserviceprovider Error table id toc tbody tr td div id toctitle Contents div ul li a href Error C filetime Ambiguous Symbol a li li a href Error C Ambiguous Symbol a li li a href System string To Std string a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and relatedl policies of this site About Us Learn more about Stack c cli iserviceprovider ambiguous symbol Overflow the company Business Learn more about hiring developers or posting ads

iserviceprovider ambiguous symbol error

Iserviceprovider Ambiguous Symbol Error table id toc tbody tr td div id toctitle Contents div ul li a href Iserviceprovider Ambiguous Symbol Servprov H a li li a href Error C filetime Ambiguous Symbol a li li a href System string To Std string a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might relatedl have Meta Discuss the workings and policies of this p h id Iserviceprovider Ambiguous Symbol Servprov H p site About Us Learn more about Stack Overflow the company Business Learn