示例#1
0
文件: test.cpp 项目: zzzzzga/test
int kindof(int n)
{
	if (n == 1)
		return 1;
	else if (n == 2)
		return 1;
	else{
		return kindof(n - 1) + kindof(n - 2);
	}
}
bool hashmap_entry_set_remove(id self, void* data) {
    hashmap_entry_set hes = cast(hashmap_entry_set, self);
    hashmap hm = hes->_host;
    if (!kindof(data, hashmap_entry)) {
        return false;
    }
    hashmap_entry ent = (hashmap_entry)data;
    // TODO
}
bool hashmap_entry_set_contains(id self, void* data) {
    hashmap_entry_set hes = cast(hashmap_entry_set, self);
    hashmap hm = hes->_host;
    if (!kindof(data, hashmap_entry)) {
        return false;
    }
    hashmap_entry ent = (hashmap_entry)data;
    hashmap_entry result = hashmap_get_entry(hm, ent->key);
    return result != NULL && hes->compare(result, ent);
}
示例#4
0
文件: test.cpp 项目: zzzzzga/test
int main1()
{
	printf("сп%dжж©идэ\n", kindof(50));
	return 0;
}