Hi,
I am a little bit troubled.
I want to call a function in a separate file on a windows form.
Here is my header file:
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
String ^OriginalText;
String ^ConvertedText;
OriginalText = this->textBox1->Text;
ConvertedText = ParseBBCode(OriginalText);
this->textBox2->Text = ConvertedText;
}
This means that when button1 is clicked, two variables are declared. One of them is set to the value in textBox2. Then, I execute the function ParseBBCode(/*string parameter*/) and assigned the returned string to textBox2.
Here is my .cpp file:
String ^ParseBBCode(String ^OriginalText) {
String ^ParsedBBCode
//manipulate OriginalText and assign to ParsedBBcode
return ParsedBBCode;
}
I know I'm missing something, but I don't know what. What do I need to include the function into the header? I have #include <string> in the .cpp file. I can't use #include "xxx.cpp" because it generates about 80 errors. The once I'm stuck with right now is just this one:
error C3861: 'ParseBBCode': identifier not found
Thanks!