Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class(Foo)
- method(void, foo, char *text)
- {
- printf("%s%c\n", text, self->ending);
- }
- instance_variable(ending);
- end()
- Foo *newFoo()
- {
- Foo *foo = (Foo*)malloc(sizeof(Foo));
- return foo;
- }
- int main()
- {
- Foo *foo = new(Foo);
- foo->ending = '!';
- $(foo, foo);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement