-
January 10th, 2014, 10:29 AM
#1
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
-
January 10th, 2014, 10:43 AM
#2
Re: Ambiguous symbol in code.....
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.
Victor Nijegorodov
-
January 12th, 2014, 05:26 AM
#3
Re: Ambiguous symbol in code.....
This is error
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
-
January 12th, 2014, 05:52 AM
#4
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.
Victor Nijegorodov
-
January 12th, 2014, 01:38 PM
#5
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.
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.
-
January 13th, 2014, 11:07 AM
#6
Re: Ambiguous symbol in code.....
Thanx..
It worked...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|