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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:18:43+00:00 2026-06-15T22:18:43+00:00

I am programming for the Arduino. I want to use an array, but I

  • 0

I am programming for the Arduino. I want to use an array, but I want to change the contents of the array, while the code is running with the same code I used to initialize the array:

I can do this:

boolean framebuffer[6][5] = {
    {0,0,1,0,0},
    {0,0,0,1,0},
    {0,0,1,0,0},
    {0,1,0,0,0},
    {1,0,0,0,0},
    {1,1,1,1,1}
  };

But I can’t do this:

  framebuffer = {
    {0,0,1,0,0},
    {0,0,0,1,0},
    {0,0,1,0,0},
    {0,1,0,0,0},
    {1,0,0,0,0},
    {1,1,1,1,1}
  };

Is there any possibility to set the array content like this? I don’t want assign each array element individually, like this:

  framebuffer[0][0] = 0;
  • 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-15T22:18:45+00:00Added an answer on June 15, 2026 at 10:18 pm

    You can’t directly do it like that, but you can have all your arrays predefined, then memcpy them to framebuffer:

    // Put all your preconstructed items in some array.....
    // You'd typically make this a global.
    
    boolean glyphs[2][6][5] = {
        {
            {0,0,1,0,0},
            {0,0,0,1,0},
            {0,0,1,0,0},
            {0,1,0,0,0},
            {1,0,0,0,0},
            {1,1,1,1,1}
        },
        {
            {1,1,1,1,1},
            {1,0,0,1,1},
            {1,0,1,0,1},
            {1,1,0,0,1},
            {1,0,0,0,1},
            {1,1,1,1,1}
        }
    };
    
    // Then whereever you want to change the framebuffer in your code:
    // copy the second into a framebuffer:
    memcpy(framebuffer, glyphs[1], sizeof(boolean)*6*5);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When programming a big project, you often need the same pieces of code in
In programming you can use the this keyword this.Textbox or just Textbox What is
I want to read data from an Arduino micro controller to my pc running
Programming is learned by writing programs. But code reading is said to be another
programming my arduino microcontroller board in C, I noticed a strange behaviour. Because of
Programming for my Arduino (in some kind of mix of C/C++), I noticed something
I'd like to start messing around programming and building something with an Arduino board,
Programming language: Java Ok, so I want to have a BufferedImage that keeps rotating
Programming in a sense is easy. But bugs are something which always makes more
When programming through sockets in C, one can automatically get information about their interfaces

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.