Hi i'm a little confused about a pointer issue.
var sound_handle = 0 // variable sound handle
var* pnt_to_sound = &sound_handle; // pointer to handle
Ok, all well and good, the pointer is set to point to the variable.
Now i'm trying to play a sound and return the handle into the var.
Setting it directly...
sound_handle = snd_play("hi.wav",100,0);
no errors here. Setting it through the pointer...
*pnt_to_sound = snd_play("hi.wav",100,0);
Produces a crash. I thought it would work like this because dereferencing the pointer gets you the variable.
I dont really work with pointers (i'm a C# guy), so i dont know what's wrong.