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 8421449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:09:14+00:00 2026-06-10T03:09:14+00:00

I work with mmorpg and I’m creating a system named chatlink. On this system

  • 0

I work with mmorpg and I’m creating a system named chatlink. On this system when a player press ctrl over the item, the item is linked on the chat so when it’s sent all players who received the chat message will be able to click over that part of the sentence and a window with the item specs will come up.

Consider the folowing:

Player : Hey I’m selling <ItemA> and <Scale Boots>.

I must store on a class the following, (< position start ), (> position end ), item name color, item, (the item is stored via a void* pointer). I have the following class:

class chatitem
{
public:
    chatitem();
    ~chatitem();

    u_long m_uStartPos;
    u_long m_uEndPos;
    DWORD m_dwColor;
    void* m_pItemElem;
};

I want to store it on a map:
map<unsigned int, chatitem*>m_chatItem which unsigned is the id of the chat line where it was input. The problem is each sentence can store up to 3 items. I’ve considered the following:

class CChatItem
{
public:
    CChatItem();
    ~CChatItem();

    u_long m_uStartPos[3];
    u_long m_uEndPos[3];
    DWORD m_dwColor[3];
    void* m_pItemElem[3];
};

or duplicating like:

u_long m_uStartPos, u_long m_uStartPos2, u_long m_uStartPos3;

But I don’t want to use both of them, so any tips?

  • 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-10T03:09:15+00:00Added an answer on June 10, 2026 at 3:09 am
    std::map<unsigned, std::array<chatitem*, 3>>
    

    Looks like the bill be fitted to me.

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

Sidebar

Related Questions

Work on this small test application to learn threading/locking. I have the following code,
I'm starting on a javascript MMORPG that will actually work smoothly. Currently, I created
In short I'm creating a 2D mmorpg and unlike my last mmo I started
Work on C# .I want to inherit generic class for this purpose i write
Work on C# linq.I have a list to list .From this list I want
Work on C#.In my application several time need to select\collect datafrom DB.Fro this task
At work, in csh, I use this alias in my .alias file: alias n
I work in an environment that is totally .NET. However, over the past few
At work we use this construction to, for example, find out the names of
I work in Emacs with ergoemacs minor mode turned on. This minor mode changes

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.