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

  • SEARCH
  • Home
  • 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 9186759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:36:37+00:00 2026-06-17T19:36:37+00:00

Edit: Sorry for this question, really don’t know what I was asking for. Stackoverflow

  • 0

Edit: Sorry for this question, really don’t know what I was asking for. Stackoverflow does not allow me to delete this question lol. If a mod sees this, please just delete.

Here’s a "minimized" version of the code I’m having problems with:

class Texture {
};
class MyClass {
    static Texture Image;
};

int main() {
    vector<MyClass> Zombies; // The array Increases in the program
    MyClass Player;

    return 0;
}

So my problem seems to be that the two objects uses the same texture, I know that’s how static works, but I don’t know how I can make a static that just covers up each array.

  • 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-17T19:36:39+00:00Added an answer on June 17, 2026 at 7:36 pm

    If I understand correctly, you want one texture for the entire array of Zombies and another texture for Player.

    There’s no way to do this automatically – your choices are to have all instances of the class share a single static member, or have each object contain its own.

    If you break out the texture separately and have the objects contain a reference or pointer instead, you can share the texture objects that way. It will be up to you to initialize the reference or pointer in the constructor of each object.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry, I don't really know how to title this question. Here's my code in
[edit]: I'm terribly sorry for my timing on asking this question. I've just discovered
Sorry if this question will sound too chaotic, feel free to edit it. I
EDIT: It does work (sorry). Something in this script is causing it to stop
Before answering this question, understand that I am not asking how to create my
I'm sorry for asking this sort of questions, but I really couldn't find the
I don't know if this question is specific to Foundation command line tools, but
I'm not sure, if this is really a question or more an observation -
Sorry if this question was supposed to be in Server Vault. I couldn't really
I'm really sorry if this question has nothing to do on this site, but

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.