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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T15:25:21+00:00 2026-05-16T15:25:21+00:00

I am trying to move the float array ptr 256 units from the start

  • 0

I am trying to move the float array ptr 256 “units” from the start so (256 * 4 bytes) for floats.
I am receiving a compile time error.

long new_capture_length = 4096;
long step_size = 256;
float data[new_capture_length];
data+=step_size;

error: invalid operands to binary + (have ‘float[(long unsigned int)(new_capture_length)]’ and ‘float *’)

How can I achieve this?

  • 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-16T15:25:21+00:00Added an answer on May 16, 2026 at 3:25 pm

    You cannot “move” an array. You can move a pointer into an array, for example:

    long new_capture_length = 4096;
    long step_size = 256;
    float data[new_capture_length];
    float* p_data = &data[0];
    
    p_data+=step_size; /* p_data now points 256 floats into data, i.e. to data[256]  */
    

    But the location of data itself can never be altered, since it is not a pointer.

    I gave a somewhat more detailed answer to a very similar question recently: C Pointer Question (I don’t like to call “what’s wrong with this code” type questions exact duplicates even if they have the same underlying problem).

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

Sidebar

Related Questions

I'm very new at this and I'm trying to move values from one array
I am trying to move an object from one database into another. The mappings
I'm trying to move one list item from one side to another. However, it
Am trying to move an antique C++ code base from gcc 3.2 to gcc
I'm trying to use gluLookAt in an Android app to move the camera around,
I'm messing about with some stuff in XNA and am trying to move an
I'm trying to use the accelerometer to move a UIImage. I works well but
I am trying to make a UIImageView move when I tap a button. I
I am trying to animate random point that i have created so they move
I've been dealing with this problem for quite some time. What I am trying

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.