Skip to content

Instantly share code, notes, and snippets.

@ybenjo
Created July 14, 2010 09:52
Show Gist options
  • Save ybenjo/475257 to your computer and use it in GitHub Desktop.
Save ybenjo/475257 to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
class TEST1{
typedef int id;
public:
A(){};
void set(id n){
x = n;
};
void show(){
cout << x << endl;
};
id x;
};
class TEST2 : public TEST1{
typedef string id;
public:
B(){};
};
int main(){
TEST1 test1;
test1.set(100);
test1.show();
TEST2 test2;
test2.set("100");
test2.show();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment