• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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