Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8801725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:54:27+00:00 2026-06-14T00:54:27+00:00

Newbie… I want to create a dynamicly growing list that will hold Point variables,

  • 0

Newbie…
I want to create a dynamicly growing list that will hold Point variables, a couple of int variables and whatever the colour variable is for Argb.

I’m doing it in Visual Studio C++ 2010

What is the best approach to handle this data within the program? It needs to store location, size and colour of objects that the user makes on the screen so I can draw them back to the Form when I refresh the Form. Currently I have a really nice program that draws squares,circles and lines in different colours and I can move that object around but this is only because I’m still holding onto the current object/shape data.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T00:54:29+00:00Added an answer on June 14, 2026 at 12:54 am

    Create a struct or class to hold the information for one shape, and then use an std::vector to hold a list of them.

    std::vector<Shape> myShapes;
    

    If all of your shapes can be described by essentially the same data set, with some variance in size of some pieces of data, e.g the number of “Point varaibles” changes from shape to shape, then have a std::vector inside the shape class to hold them that variable data, e.g:

    struct coordinate2D
    {
        int x;
        int y;
    };
    
    class Shape
    {
        coordinate2D position; //the location on the shape
        std::vector<coordinate2D> points; // the coordinates of the vertices that make up this shape.
    };
    
    //elsewhere
    std::vector<Shape> myShapes;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

newbie question, please forgive... I'm developing a Wpf UserControl that will eventually be bound
Newbie question: I just installed VisualSVN Server and created a repository. I noticed that
Newbie question. I have Django models that look like this: class Video(models.Model): uploaded_by =
Newbie C++ programmer here. I'm trying to write a command line application that takes
Newbie here. I am looking at company code. It appears that there are NO
Newbie question. I want to do something like: SELECT c1,c2,c3 FROM TABLE t1 UNION
Newbie asking for help: I have an array of numbers that needs to be
Newbie backbone question: Context: Building a shopping list with backbone I have a model
Newbie- I want to do 2 things with these checkboxes: Use TAB key to
newbie here! I have source data that contains both simplified and traditional Chinese in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.