int main(int argc, char *argv[]) { void *a = new(String, "a"); void *b = new(String, "bbb"); void *s = new(Set); printf("LENGTH A: %lu\n", string_length(a)); printf("LENGTH B: %lu\n", string_length(b)); printf("Prev: %s\n", string_get(a)); string_set(a, "New String"); printf("New: %s\n", string_get(a)); set_add(s, a); set_add(s, b); printf("CONTAINS A: %u\n", set_contains(s, a)); printf("CONTAINS B: %u\n", set_contains(s, b)); printf("DROP B: %p\n", set_drop(s, b)); printf("DROP B: %p\n", set_drop(s, b)); printf("ADD B: %p\n", set_add(s, b)); delete(s); delete(a); delete(b); return 0; }
projectile &projectile::operator=( const projectile &other ) { impact = other.impact; speed = other.speed; proj_effects = other.proj_effects; set_drop( other.get_drop() ); return *this; }
projectile &projectile::operator=( const projectile &other ) { impact = other.impact; speed = other.speed; range = other.range; proj_effects = other.proj_effects; set_drop( other.get_drop() ); set_custom_explosion( other.get_custom_explosion() ); return *this; }