75 lines
1.0 KiB
C
75 lines
1.0 KiB
C
|
|
|
||
|
|
#include "../console.h"
|
||
|
|
|
||
|
|
#include "../street.h"
|
||
|
|
|
||
|
|
#include "../user.h"
|
||
|
|
|
||
|
|
#include "../array.h"
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
void main() {
|
||
|
|
|
||
|
|
struct user * newUser = new user();
|
||
|
|
|
||
|
|
newUser->id = 1;
|
||
|
|
|
||
|
|
newUser->username = "peter";
|
||
|
|
|
||
|
|
newUser->userlevel = 2134;
|
||
|
|
|
||
|
|
newUser->hash = "#234234325";
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
struct array * addresses = newUser->addresses;
|
||
|
|
|
||
|
|
|
||
|
|
address * someAddress = new address();
|
||
|
|
|
||
|
|
someAddress->street = "HiLane";
|
||
|
|
|
||
|
|
someAddress->number = 1234;
|
||
|
|
|
||
|
|
addresses->add( someAddress );
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
address * otherAddress = new address();
|
||
|
|
|
||
|
|
otherAddress->street = "OtherLane";
|
||
|
|
|
||
|
|
otherAddress->number = 4567;
|
||
|
|
|
||
|
|
addresses->add( otherAddress );
|
||
|
|
|
||
|
|
// todo newUser->addresses->add( otherAddress );
|
||
|
|
|
||
|
|
|
||
|
|
printf("adresses count: %i\n\n", addresses->length() );
|
||
|
|
|
||
|
|
|
||
|
|
char * something = "this is from an char * ";
|
||
|
|
|
||
|
|
int somethingElse = 123;
|
||
|
|
|
||
|
|
|
||
|
|
console.log( "Goedendag",
|
||
|
|
123456,
|
||
|
|
"en een andere text.",
|
||
|
|
something,
|
||
|
|
somethingElse,
|
||
|
|
"something en something",
|
||
|
|
"in native c",
|
||
|
|
23456,
|
||
|
|
newUser,
|
||
|
|
"and some text again" );
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
void abort() {
|
||
|
|
|
||
|
|
|
||
|
|
}
|