コード例 #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);
	}
}
コード例 #2
0
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
}
コード例 #3
0
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;
}