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

The Archive Base Latest Questions

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

i had a question in my program. When I pass the 3D int array

  • 0

i had a question in my program. When I pass the 3D int array CodedGreen to the function Green_Decode_Tree. An error message”invalid use of array with unspecified bounds” displayed. What is the mistake in my program? Thanks for your help.

for(i=0;i<256;i++){
          for(j=0;j<256;j++){
    Decode_Tree(green[0], CodedGreen,0,i,j);
          }
      }

void Green_Decode_Tree(node* tree, int code[][][], int num,int row,int col)
{
    int i;
    i=num;

    if((tree->left == NULL) && (tree->right == NULL)){
        fprintf(DecodGreen,"%s\n", tree->ch);
    }
    else
    {
        if(code[row][col][num]==1){
            i++;
            Green_Decode_Tree(tree->left,code,i,row,col);
        }
        else if (code[row][col][num]==0){
            i++;
            Green_Decode_Tree(tree->right,code,i,row,col);
        }

    }

}
  • 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-14T01:49:08+00:00Added an answer on May 14, 2026 at 1:49 am

    i will reveal you a secret. 2d (and 3d) arrays are represented as liner memory arrays. when you have array NxM and access it like a[i][j] it is actually translated to a[i*M + j] as you might notice compiler must know M here to do this conversion, otherwise it will not be able to translate it. So thats what he asks. You must provide all except first sizes in array: int code[][M][N]

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

Sidebar

Related Questions

This question has baffled myself and my cohorts. In the program I had written
It's a basic question.. but had to ask. For a program like this, if
I am new to CUDA. I had a question on a simple program, hope
hey there, just practising and I had a question. I have a program (source
I had asked a question here on how to get a sql function(max) result
I'm new to StackOverflow and I had a simple question. I'm writing a program
I had a question about a program I've been trying to get running. Encrypt
I had a question regarding this program I was trying to write. fin =
just had a question to a simple chat program i wrote in java. The
I had a question in MySQL, did it correctly. But the book code differs

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.