Stuck with vectors

The Partridge Family were neither partridges nor a family. Discuss.
Paul
Posts: 15
Joined: December 31st, 2021, 1:45 am

Re: Stuck with vectors

Post by Paul » January 12th, 2022, 7:31 am

Oh didn't realize circular inclusion gave such weird errors :lol: . Ya at first I created the Button children in the same file and I had ship and planet buttons that I later combined to a location button. Guess I didn't need all of those includes. I got rid of all the unnecessary includes in button and added a few more includes in the children and it was up and working again! Thanks for your time and work! I'll be sure to look at your include chart and be more careful about what I include in the future.

albinopapa
Posts: 4358
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Stuck with vectors

Post by albinopapa » January 12th, 2022, 8:37 am

Before I made that chart, I had made changes to exclude the circular references. It doesn't include files from the framework nor the standard library, just those pertaining to your game.

When you do look at it, the lines go from the file that is included to the file that includes them. In other words, the arrows point to the containing header that has the #include in it.
Game.h <----- Location.h
instead of
Game.h -----> Location.h

I wish there was a way to color the elements, but the online version doesn't have that feature. Not sure if the desktop app does or not, but the desktop app does have a lot more settings so it might. Might be worth a look. With it, you can create all kinds of graphs to help organize your project like flow charts and UML diagrams. I've mostly used it for flow charts for state machines.

So, ready for my next suggestion?

Sign up for Gihub. Upload your project there and save yourself the hassle of zipping your project up and uploading here. It has a few benefits.
  1. No cleaning and zipping, then uploading. Just paste the link to your repository.
  2. Keeps track of your changes assuming you commit changes often. This is my Achilles heal.
  3. If you ever need help, the other person can fork your project make changes and create a Pull Request against your version. This way, you can actually see the changes made and decide what to keep or how to fix the issue you might be having.
  4. Create a separate branch to test something out before adding it to the main branch. This way if you don't like something, it doesn't mess up your working code. You can even use branches as a sort of versioning.
Visual Studios has gotten a lot better with working with Git. Before uploading to GitHub, make a backup of your current directory in case something goes wrong.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

Paul
Posts: 15
Joined: December 31st, 2021, 1:45 am

Re: Stuck with vectors

Post by Paul » January 12th, 2022, 9:30 am

Will definitely do GitHub! Sounds much more convenient and like a good way to back up my work in case something happens to my computer.

I will also try making my own version of an include chart with yours as a reference! Thanks!

Post Reply