Reply to Re: On the other hand...
If you don't have an account, just leave the password field blank.
: But what about declaring pointers to a heap so you can make your own '&story' for example
Well, in DinkC, variables are not reference parameters like in C++. Every variable in DinkC should have an ampersand (&
. You can't do something simple like this:
void change(float &x, float &y)
{ float w = x;
x = y;
y = w;
}
That's C++, but int DinkC every variable, global or local, should have an &. To create a local variable in a script, you can do:
int &_a;
Local variables can only be used in that script, globals can be used anywhere. To create a global variable, we usually create them in main.c:
make_global_int("&story", 0);
DinkC is a simple language and many things common in C++ can't be done in DinkC. Also, you can't include other files like .h files, DinkC scriptfiles are .c and they can be compiled to .d but that's not necessary.
Well, in DinkC, variables are not reference parameters like in C++. Every variable in DinkC should have an ampersand (&

void change(float &x, float &y)
{ float w = x;
x = y;
y = w;
}
That's C++, but int DinkC every variable, global or local, should have an &. To create a local variable in a script, you can do:
int &_a;
Local variables can only be used in that script, globals can be used anywhere. To create a global variable, we usually create them in main.c:
make_global_int("&story", 0);
DinkC is a simple language and many things common in C++ can't be done in DinkC. Also, you can't include other files like .h files, DinkC scriptfiles are .c and they can be compiled to .d but that's not necessary.
