maxpacer has asked for the wisdom of the Perl Monks concerning the following question:
***Here is the test.h file:***use Inline CPP; use Inline CPP => Config => MYEXTLIB => 'my path/test.o'; my $tc=new son(); my $sc=$tc->myget(); # why can not use its father' function? $sc=$tc->get(); __END__ __CPP__ # include "test.h" # include <iostream> using namespace std; class son: public Test { public: son():Test(){} double myget(); }; double son::myget() { cout<<"myget() is ok\n"; return 2; }
***Here is the test.cpp file:***# include <iostream> using namespace std; class Test { public: double get(); };
#include "test.h"<br> <code> double Test::get() { cout<<"Test::get() is ok\n"; return 5; }
2006-03-09 Retitled by planetscape, as per Monastery guidelines
Original title: 'Inline::CPP'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using functions from Inline::CPP in my program
by Anonymous Monk on Mar 10, 2006 at 17:08 UTC | |
by maxpacer (Novice) on Mar 12, 2006 at 06:34 UTC |