[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
overloading
Hi,
we have a console which is split in a part which will never change and a
part which is changable for different UIs.
I attached a example which describes the problem exactly.
Has anybody an idea?
bye
Felix Kollmann, DG5PT
Future Interactive [http://www.futureint.com]
[fkollmann@gmx.net]
#include <stdio.h>
#include <string>
using namespace std;
class foo_const
{
public:
void msg (string t1, string t2);
};
class foo_var : public foo_const
{
public:
void msg (string z);
} Foo;
void foo_const::msg (string t1, string t2)
{
t1.append (t2);
Foo.msg (t1);
}
void foo_var::msg (string z)
{
printf ("%s", z.c_str());
}
int main()
{
Foo.msg ("hallo", "test");
return 0;
}