38 lines
462 B
C
38 lines
462 B
C
|
|
|
|
#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();
|
|
|
|
}
|
|
|
|
} |