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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:16:49+00:00 2026-05-17T01:16:49+00:00

My question’s pretty basic, but it’s been a while. I’m reading in a text

  • 0

My question’s pretty basic, but it’s been a while. I’m reading in a text file and saving numbers in the text to a struct ‘Record’. After I read text to my Record buffer, I want to place it in an area of memory.

typedef struct
{
 int line_status[64];
 float line_data[64], relativetime;
 unsigned long blkhdr_ticks;
} Record;

Record *storage; 
storage = (Record*)malloc(nRange*sizeof(Record)); 
Record buffer;

Where nRange is some random number, and buffer is a Record with values, though I haven’t listed my code that assigns these to the buffer. I thought the syntax was something like:

&storage = buffer;

But I know that’s not right. Any help would be greatly 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-17T01:16:49+00:00Added an answer on May 17, 2026 at 1:16 am

    You can also treat storage as an array.

    storage[0] = buffer;
    storage[1] = anotherBuffer;
    ...
    storage[nRange-1] = lastBuffer;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Question is already been asked in title. Here is a code: (function($){ var filter
Question in title pretty much sums it up. I have some resource object defined
Question: I need to read a CSV file. I use the FileHelpers library to
Question I'm creating a service for my app, but there's probably pritty simple thing
Question 1: I've tried the following to detect characters (uppercase and lowercase), numbers and
Question: Can I override default functions in Javascript? Background: After figuring out that I
Question I need to make a short write to a file every 15 seconds
Question: How can I give a new user almost all privileges, but still keep
Question: How do you get a video thumbnail for an application-private file? Specifically, is
Question is rather simple but I couldn't find nice & clean solution to my

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.