bool test() { SkillFactory * factory = new SkillFactory(); Technique * fireslash = new Technique(); Spell * fireball = new Spell(); fireball->setSkillValue(5); factory->submit("fireball", fireball); factory->submit("fireslash", fireslash); json FILE_A, FILE_B; SkillLoader::load("Fireball", SKILLPATH, FILE_A) ; std::cout << FILE_A.dump(4) << std::endl; SkillLoader::save("Fireball2", SKILLPATH, FILE_A, FILE_B) ; SkillLoader::load("Fireball2", SKILLPATH, FILE_B) ; std::cout << FILE_B.dump(4) << std::endl; Skill * test = NULL; SkillLoader::loadSkill("Fireball", test); std::cout << " OK " << std::endl; return true; }