Initial commit
This commit is contained in:
38
application/source/examples/example.multiple.inheritance.c
Normal file
38
application/source/examples/example.multiple.inheritance.c
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "extends.h"
|
||||
|
||||
void main() {
|
||||
|
||||
|
||||
|
||||
struct inherit * pointer = new inherit();
|
||||
|
||||
//pointer->propertyFromC = 20;
|
||||
|
||||
|
||||
printf("pointer->propertyFromC: %i\n\n", pointer->propertyFromC );
|
||||
|
||||
pointer->methodFromC();
|
||||
|
||||
printf("\n\n\n\n");
|
||||
|
||||
|
||||
for (int i = 0; i < 10; ++i)
|
||||
{
|
||||
|
||||
struct inherit instance = new inherit();
|
||||
|
||||
instance.propertyFromA = i;
|
||||
|
||||
instance.propertyFromB = i;
|
||||
|
||||
instance.propertyFromC = i;
|
||||
|
||||
instance.methodFromC();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user