• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Question] c++ classes question

Now I understand... I can't believe I didn't see it before. *derp* o_O

@Mods: I think there should be a smiley that portrays how dumb one feels at a given moment.
 
Hey - couldn't help but notice some of the things you need to do for your project overlap with some of the things I needed to do for mine, and since they're both in C++, I thought you might want to take a look at what I have up on GitHub:

PKMDS-G5: An open source C++ library for hacking Pokémon save files

You can probably pretty easily use a portion of the pkmds-g5 class, if not also the stuff dealing with SQLite (along with Veekun's SQLite database).

I dunno. Just do this:
Code:
Pokemon* temp = team[0];
team[0] = team[5];
team[5] = temp;

What about std::swap?

Code:
void swap_pkm(pokemon_obj &a, pokemon_obj &b)
{
    std::swap(a,b);
}

...

swap_pkm(party[0],party[4]);

This is basically what I do as well.
 
Last edited:
Back
Top