2014-05-20 22:21:07 -04:00
|
|
|
import io;
|
|
|
|
|
|
|
|
|
|
typedef firstObject {
|
2014-08-01 00:45:48 -07:00
|
|
|
|int| objectNum;
|
|
|
|
|
|int| other;
|
|
|
|
|
|void| print() {
|
2014-05-20 22:21:07 -04:00
|
|
|
print(other);
|
|
|
|
|
}
|
2014-08-01 00:45:48 -07:00
|
|
|
|void| printInd() {
|
2014-05-20 22:21:07 -04:00
|
|
|
print();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
typedef Int int;
|
|
|
|
|
|
2014-08-01 00:45:48 -07:00
|
|
|
|Int| aliasNum;
|
2014-05-20 22:21:07 -04:00
|
|
|
|
2014-08-01 00:45:48 -07:00
|
|
|
|int| main() {
|
|
|
|
|
|firstObject| wooObject;
|
2014-05-20 22:21:07 -04:00
|
|
|
wooObject.objectNum = 7;
|
|
|
|
|
print(wooObject.objectNum);
|
2014-08-01 00:45:48 -07:00
|
|
|
|firstObject*| objPtr = &wooObject;
|
2014-05-20 22:21:07 -04:00
|
|
|
objPtr->objectNum = 42;
|
|
|
|
|
print(objPtr->objectNum);
|
|
|
|
|
print("\n");
|
|
|
|
|
objPtr->other = 1337;
|
|
|
|
|
objPtr->printInd();
|
|
|
|
|
print("\n");
|
|
|
|
|
}
|