delete stdout
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7085 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
af90e3222a
commit
b0033cf0ad
1 changed files with 4 additions and 4 deletions
|
|
@ -20,8 +20,8 @@ namespace simuPOP
|
||||||
{
|
{
|
||||||
Pop m_pop;
|
Pop m_pop;
|
||||||
Operator(int a):m_pop(a){}
|
Operator(int a):m_pop(a){}
|
||||||
virtual void func() const
|
virtual int func() const
|
||||||
{ std::cout << m_pop.m_a << std::endl; }
|
{ return m_pop.m_a; }
|
||||||
};
|
};
|
||||||
|
|
||||||
// derived operator, output double of pop.m_a
|
// derived operator, output double of pop.m_a
|
||||||
|
|
@ -29,8 +29,8 @@ namespace simuPOP
|
||||||
struct DerivedOperator: public Operator<Pop>
|
struct DerivedOperator: public Operator<Pop>
|
||||||
{
|
{
|
||||||
DerivedOperator(int a):Operator<Pop>(a){}
|
DerivedOperator(int a):Operator<Pop>(a){}
|
||||||
virtual void func() const
|
virtual int func() const
|
||||||
{ std::cout << 2*this->m_pop.m_a << std::endl; }
|
{ return 2*this->m_pop.m_a; }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue