Error Symbol Is Ambiguous
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 Learn more about hiring developers or error c2872 ambiguous symbol posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss
Error C2872 'iserviceprovider' Ambiguous Symbol
Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only
Error C2872 Ambiguous Symbol C++
takes a minute: Sign up getting error for ambiguous symbol and need help to remove it up vote 1 down vote favorite 1 i am getting this error which i unable to remove in visual studio 2010. i am using
Ambiguous Symbol Definition
one third party library which uses its own definition for "string" Also visual studio's xstring file is there in the folder where it gets installed. now when i am trying to compile code i am getting following error 1>...\xyz.cpp(24): error C2872: 'string' : ambiguous symbol 1> could be 'third party library path\string.h(31) 1> or 'c:\program files (x86)\microsoft visual studio 10.0\vc\include\xstring(2063) : std::string' compiler is not able to understand which string definition it should use. How can i remove this error in ambiguous symbol namespace visual studi 2010. I want the code to use third party string definition. i tried to set third party path in include directory but still i am seeing this error. Please help me. Thanks in advance c++ share|improve this question asked Feb 20 '12 at 11:27 novice 19137 Use std::string instead of just string? –BoBTFish Feb 20 '12 at 11:30 @BoBTFish "I want the code to use third party string definition." ;) –user1203803 Feb 20 '12 at 11:31 add a comment| 5 Answers 5 active oldest votes up vote 5 down vote This is an example of a namespace clash. You probably have in your code: #include <3rdPartyString.h> // declaration of 3rd party string type #include
here for a quick overview of the site Help Center Detailed answers to any questions you shared_ptr ambiguous symbol might have Meta Discuss the workings and policies of this ambiguous symbol visual studio site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or c++ ambiguous symbol namespace posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community http://stackoverflow.com/questions/9360375/getting-error-for-ambiguous-symbol-and-need-help-to-remove-it of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up What causes ambiguous symbol errors? C++ up vote 0 down vote favorite I am trying to learn C++ by doing a small windows phone app. Currently I am just following a tutorial to get to http://stackoverflow.com/questions/16800831/what-causes-ambiguous-symbol-errors-c grips with developing for the windows phone. However, I have encountered a ambiguous signal error when trying to build the code. I am used to the niceties associated with Java and am a bit lost as to what could be causing this error. The error dump I get is: 1>c:\program files (x86)\windows phone kits\8.0\include\wrl\event.h(740): error C2872: 'EventRegistrationToken' : ambiguous symbol 1> could be 'c:\program files (x86)\windows phone kits\8.0\include\eventtoken.h(51) : EventRegistrationToken' 1> or 'c:\program files (x86)\windows phone kits\8.0\windows metadata\windows.winmd : Windows::Foundation::EventRegistrationToken' 1> c:\program files (x86)\windows phone kits\8.0\include\wrl\event.h(1035) : see reference to class template instantiation 'Microsoft::WRL::EventSource
C2872: 'list' http://www.cplusplus.com/forum/general/70097/ : ambiguous symbol Function prototype of the method i'm https://www.gidforums.com/t-4512.html using : RL(std::list<char> r_data, Ogre::String addr, unsigned long port){..} Can anyone help me to overcome from this problem.. Thanks in advance...:) May 3, 2012 at 8:15am UTC rollie (304) The docs I've found regarding that error seem ambiguous symbol to indicate it is an used caused by the 'using' directive. Are you calling 'using namespace std' or 'using std::list' either in the current file, or in an included header file? May 3, 2012 at 10:34am UTC rutharanga (8) Thanks a lot, I have removed 'using namespace error c2872 ambiguous std', but same error is occurring again. I have imported "ogresockets" and It seems like in it's header file there's a "using" directive calling . Do you have any idea to resolve the problem i have..? May 3, 2012 at 10:36am UTC MrHutch (1821) Sounds to me like there's two definitions of list objects somewhere. Perhaps in different header files you're including? May 3, 2012 at 10:52am UTC codekiddy (783) I don't think the problem is in your prototype function since you explicitly typed std::list<char> which is from std namespace explicitly. somewhere in your code simbol list is used without scope operator. Topic archived. No new replies allowed. C++ Information Tutorials Reference Articles Forum Forum BeginnersWindows ProgrammingUNIX/Linux ProgrammingGeneral C++ ProgrammingLoungeJobs Home page | Privacy policy© cplusplus.com, 2000-2016 - All rights reserved - v3.1Spotted an error? contact us
Thread Tools Search this Thread Rate Thread #1 07-Jan-2005, 15:24 small_ticket Junior Member Join Date: May 2004 Posts: 45 What is "Ambigious symbol" ??*( a compilation error) Here is some code: CPP / C++ / C Code:
void Interpreter :: read ( char *filename ) { ifstream inClientFile ( filename , ios::in ); //exitprogram if ifstream could not open file if(!inClientFile ) { cerr << "File could not be opened" <and here are the errors: Code: c:\program files\microsoft visual studio\vc98\include\ios.h(146) : error C2872: 'streambuf' : ambiguous symbol c:\program files\microsoft visual studio\vc98\include\ios.h(159) : error C2872: 'ostream' : ambiguous symbol c:\program files\microsoft visual studio\vc98\include\ios.h(159) : error C2872: 'ostream' : ambiguous symbol c:\program files\microsoft visual studio\vc98\include\ios.h(160) : error C2872: 'ostream' : ambiguous symbol c:\program files\microsoft visual studio\vc98\include\ios.h(180) : error C2872: 'streambuf' : ambiguous symbol c:\program files\microsoft visual studio\vc98\include\ios.h(207) : error C2872: 'streambuf' : ambiguous symbol c:\program files\microsoft visual studio\vc98\include\ios.h(210) : error C2872: 'streambuf' : ambiguous symbol c:\program files\microsoft visual studio\vc98\include\ios.h(219) : error C2872: 'ostream' : ambiguous symbol c:\program files\microsoft visual studio\vc98\include\streamb.h(90) : error C2872: 'streampos' : ambiguous symbol c:\program files\microsoft visual studio\vc98\include\streamb.h(90) : error C2872: 'streamoff' : ambiguous symbol c:\program fi1); } char lineNo[2]; char *string1; char string[80]; //display each line while(inClientFile.getline(string,80)){ for(int i=0;i<2;i++) //strtok da kullanlabilir... lineNo[i]=string[i]; int y = atoi (lineNo); string1=&string[3]; listObject.insert(string1,y); //cout<< string1 << "\n"; } }