Hi Susanne,
When you define the method test() which is a member of the Exportfilter
class according to the class definition you need to write:
void Exportfilter::test(){...}
(unless you have your definition inline)
In the example you create an object in the main method which then calls the
test method like this:
myExportfilter->test();
If you want the test method to operate on the object you created in the main
method, put this in you test method (or maybe you wanted to create a new
object in the test method?):
void Exportfilter::test() {
this->Run_String_Einlesen();
this->Variablen_setzen();
Quote:
}
(You can actually omit "this->", but I think it makes things clearer when
you put it in.)
If you define your method Oberflaechenvariablen_setzen like this:
void Exportfilter::Oberflaechenvariablen_setzen(String *first, String
*second, String* third){...}
Then you should have no problem calling it:
myExportfilter->Oberflaechenvariablen_setzen(first, second, third);
Hope this helps.
/Catherine
Quote:
> I hope anyone can explain this to me.
> This is my beispiel1.cpp-file:
> namespace Export
> {
> __gc public class Exportfilter
> {
> public:
> void test();
> void Oberflaechenvariablen_setzen (String
> *first, String *second, String* third);
> private:
> void Variablen_setzen ();
> void Run_String_Einlesen ();
> };
> }
> The test-Funktion looks like this:
> void test()
> {
> Exportfilter* myExportfilter = new Exportfilter();
> myExportfilter->arraylist_leeren();
> myExportfilter->Run_String_Einlesen();
> myExportfilter->Variablen_setzen();
> }
> from my win-32-applikation I call the Main-Funktion like
> this:
> Export::Exportfilter* myExportfilter = new
> Export::Exportfilter();
> myExportfilter->test();
> But now I want to call the function
> Oberflaechenvariablen_setzen. And this I have to call
> like this:
> myExportfilter->Exportfilter::Oberflaechenvariablen_setzen
> (first, second, third );
> My question ist now, why do I have to write here
> Exportfilter::Oberflaechenvariablen_setzen and not like
> this:
> myExportfilter->Oberflaechenvariablen_setzen(first,
> second, third ); like I call the test-function.
> greetings
> Susanne