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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:05:54+00:00 2026-05-16T23:05:54+00:00

I have been implementing a visual debugger in my application using another bit of

  • 0

I have been implementing a visual debugger in my application using another bit of source code. I ran into an issue when I stumbled across them using this..

struct DebugVertex
{
    gkVector3 v;
    unsigned int color;
};


typedef utArray<DebugVertex> Buffer;

I found the free library that they are using for utArray, however I like to stick with the included libraries when possible (it seems like they used external libs just cause). This is what the definition of utArray looks like…

template <typename T>
class utArray
{
public:
    typedef T           *Pointer;
    typedef const T     *ConstPointer;

    typedef T            ValueType;
    typedef const T      ConstValueType;

    typedef T           &ReferenceType;
    typedef const T     &ConstReferenceType;

    typedef utArrayIterator<utArray<T> >       Iterator;
    typedef const utArrayIterator<utArray<T> > ConstIterator;

public:
    utArray() : m_size(0), m_capacity(0), m_data(0), m_cache(0)  {}

    utArray(const utArray<T>& o)
        : m_size(o.size()), m_capacity(0), m_data(0), m_cache(0)
    {
        reserve(m_size);
        copy(m_data, o.m_data, m_size);
    }

Is there anything similar I can use? I am not experienced defining a type based on a struct array so any help would be appreciated.

  • 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-05-16T23:05:55+00:00Added an answer on May 16, 2026 at 11:05 pm

    From all standard sequence STL containers probably vector & deque are closest to an array (at least to me, I associate random access with arrays…).

    The only problem you would have is that STL containers have different naming conventions for the internal typedefs like: iterator, pointer, value type & so on. If you really like typing Buffer::Iterator instead of Buffer::iterator then you’ll need to have a proxy type over the STL type of your choosing. Something like:

    #include <vector>
    
    template <typename T>
    class utArray
    {
    private:
       typedef std::vector<T>                             InnerContainer;
       InnerContainer                                     m_innerContainer;
    
    public:
       typedef typename InnerContainer::pointer           Pointer;
       typedef typename const InnerContainer::pointer     ConstPointer;
    
       typedef typename InnerContainer::value_type        ValueType;
       typedef const typename InnerContainer::value_type  ConstValueType;
    
       typedef typename InnerContainer::reference         ReferenceType;
       typedef typename InnerContainer::const_reference   ConstReferenceType;
    
       typedef typename InnerContainer::iterator          Iterator;
       typedef typename InnerContainer::const_iterator    ConstIterator;
    
    public:
       utArray() {}
    
       utArray(const utArray<T>& o)
          : m_innerContainer(o.m_innerContainer)
       {
       }
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For a personal project I have been implementing my own libstdc++. Bit by bit,
I have been implementing AES onto my website for security and I have ran
I have been using Python's pickle module for implementing a thin file-based persistence layer.
So I have been looking into implementing a lowest common ancestor algorithm. I looked
I have been reading a number of tutorials on implementing Structure Map IoC/di into
I have been having quite a bit of trouble implementing unit testing on the
I've have been working on implementing the InfoBox code for one of my web
I have been using Omniture in my app.In the new version I am implementing
I have been implementing a heap in C++ using a vector. Since I have
I have been implementing RSA security for a project I am working on. I'm

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.