Ambiguous symbol in code.....
I am working on my project of gesture recognition using c++ and open cv and i am also designing GUI simultaneously.
I am using system namespace for GUI part and cv namespace for gestures.
After compiling i am getting error as Ambiguous symbol String is used.
Can anyone help me to solve this error.
This the link for msdn error help :
http://msdn.microsoft.com/en-us/library/t57wswcs.aspx
;)
Re: Ambiguous symbol in code.....
Quote:
Originally Posted by
DevendraM
I don't understand: if this link does help then why do you ask?
If it does NOT help you then, please post your code that produces this error.
1 Attachment(s)
Re: Ambiguous symbol in code.....
This is error
Attachment 32259
I am attaching code also..
Code:
private: System::Void pictureBox3_Click(System::Object^ sender, System::EventArgs^ e) {
if(i<100)
{
this->progressBar1->Increment(5);
this->i=this->i+5;
String^ S=String::Format("{0}",i);
this->button1->Text=S;
}
else
{
String^ S=String::Format("Can not increment value beyond 100");
MessageBox::Show(S);
}
}
For the string variable i used here i am getting error
I have used cv namespace and system name space
Re: Ambiguous symbol in code.....
It is not a native C++ code. It is a manged one. So it should be discussed in a corresponding Forum.
Re: Ambiguous symbol in code.....
You can't have using directives for both the System and cv namespaces in the same compilation unit (speaking simplified: source file) or you must explicitly qualify the the String class you're actually meaning by its namespace, i.e. System::String if you want the one from the .NET Framework Library. I don't know OpenCV myself; there may be other class names conflicting with .NET classes you'll need to qualify.
Alternatively, you may simply omit the using namespace cv; and use the .NET framwork String class as usual, but then you'll need to explicitly qualify any OpenCV class (or free function or global variable) you use.
Re: Ambiguous symbol in code.....
Thanx..
It worked...:cool: