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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:38:26+00:00 2026-05-15T12:38:26+00:00

I have a pointer (uint8_t *myPointer), that I pass as parameter to a method,

  • 0

I have a pointer (uint8_t *myPointer), that I pass as parameter to a method, and then this method sets a value to this pointer, but I want to know how many bytes are used (pointed at ?) by the myPointer variable.

Thanks in advance.

  • 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-15T12:38:26+00:00Added an answer on May 15, 2026 at 12:38 pm

    The size of the pointer: sizeof(myPointer) (Equal to sizeof(uint8_t*))
    The size of the pointee: sizeof(*myPointer) (Equal to sizeof(uint8_t))

    If you meant that this points to an array, there is no way to know that. A pointer just points, and cares not where the value is from.

    To pass an array via a pointer, you’ll need to also pass the size:

    void foo(uint8_t* pStart, size_t pCount);
    
    uint8_t arr[10] = { /* ... */ };
    foo(arr, 10);
    

    You can use a template to make passing an entire array easier:

    template <size_t N>
    void foo(uint8_t (&pArray)[N])
    {
        foo(pArray, N); // call other foo, fill in size.
        // could also just write your function in there, using N as the size
    }
    
    uint8_t arr[10] = { /* ... */ };
    foo(arr); // N is deduced
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 497k
  • Answers 497k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer width="350px" px is CSS. No px when using the HTML… May 16, 2026 at 11:53 am
  • Editorial Team
    Editorial Team added an answer The performance difference will most likely be miniscule in this… May 16, 2026 at 11:53 am
  • Editorial Team
    Editorial Team added an answer You should use INNER JOIN. Take a look here: http://www.postgresql.org/docs/8.1/interactive/queries-table-expressions.html… May 16, 2026 at 11:53 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

So I have this 2d dynamic array which content I want to free when
I have a pointer to a COM object that implements an undocumented interface. I
I want to send out an NSArray, so I have to write it to
I have a UINT8 pointer mArray, which is being assigned information via a *(UINT16
On my AVR I have an array of chars that hold color intensity information
I have an antlr generated Java parser that uses the C target and it
I have a pointer in a struct. And I passed a struct pointer to
I have a very simple class that opens a file and creates a memory
I have implemented a templated buffer class like this: template <class T, class Impl>
I am trying to capture video from a camera. i have gotten the captureOutput:didOutputSampleBuffer:

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.